<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Win32k: mnchange.c 文件参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Win32k
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('a00764.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#define-members">宏定义</a> &#124;
<a href="#typedef-members">类型定义</a> &#124;
<a href="#func-members">函数</a>  </div>
  <div class="headertitle">
<div class="title">mnchange.c 文件参考</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;<a class="el" href="a03629_source.html">precomp.h</a>&quot;</code><br />
</div>
<p><a href="a00764_source.html">浏览源代码.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
宏定义</h2></td></tr>
<tr class="memitem:a564740dd1ded698906e3d819f9e89d6d"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00764.html#a564740dd1ded698906e3d819f9e89d6d">CMENUITEMALLOC</a>&#160;&#160;&#160;8</td></tr>
<tr class="separator:a564740dd1ded698906e3d819f9e89d6d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa2c6c7fa7e6bbe61abc18d745e6773a4"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00764.html#aa2c6c7fa7e6bbe61abc18d745e6773a4">CMENUITEMDEALLOC</a>&#160;&#160;&#160;10</td></tr>
<tr class="separator:aa2c6c7fa7e6bbe61abc18d745e6773a4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
类型定义</h2></td></tr>
<tr class="memitem:a05200040c4a28450c70e4d2f532c9ca2"><td class="memItemLeft" align="right" valign="top">typedef BOOL(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00764.html#a05200040c4a28450c70e4d2f532c9ca2">MENUAPIFN</a>) (<a class="el" href="a00365.html#af18dd4dd192e00a176acc4dc89084f34">PMENU</a>, <a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>, BOOL, LPMENUITEMINFOW)</td></tr>
<tr class="separator:a05200040c4a28450c70e4d2f532c9ca2"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
函数</h2></td></tr>
<tr class="memitem:ab0badc85e28199cedd2e7fac69eaa798"><td class="memItemLeft" align="right" valign="top">BOOL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00764.html#ab0badc85e28199cedd2e7fac69eaa798">SetLPITEMInfo</a> (<a class="el" href="a00365.html#af18dd4dd192e00a176acc4dc89084f34">PMENU</a> pMenu, <a class="el" href="a00365.html#ab0258112d5896d2fea97153725ae601f">PITEM</a> pItem, LPMENUITEMINFOW lpmii, PUNICODE_STRING pstr)</td></tr>
<tr class="separator:ab0badc85e28199cedd2e7fac69eaa798"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4bee8199e47acc4dce08bdf3ecc0959e"><td class="memItemLeft" align="right" valign="top">BOOL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00764.html#a4bee8199e47acc4dce08bdf3ecc0959e">_SetMenuItemInfo</a> (<a class="el" href="a00365.html#af18dd4dd192e00a176acc4dc89084f34">PMENU</a> pMenu, <a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a> wIndex, BOOL fByPosition, LPMENUITEMINFOW lpmii, PUNICODE_STRING pstrItem)</td></tr>
<tr class="memdesc:a4bee8199e47acc4dce08bdf3ecc0959e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Global Insert/Append/Set client/server interface  <a href="a00764.html#a4bee8199e47acc4dce08bdf3ecc0959e">更多...</a><br /></td></tr>
<tr class="separator:a4bee8199e47acc4dce08bdf3ecc0959e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9d9d8f1a139d1fbaf0101349df86c18a"><td class="memItemLeft" align="right" valign="top">BOOL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00764.html#a9d9d8f1a139d1fbaf0101349df86c18a">_InsertMenuItem</a> (<a class="el" href="a00365.html#af18dd4dd192e00a176acc4dc89084f34">PMENU</a> pMenu, <a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a> wIndex, BOOL fByPosition, LPMENUITEMINFOW lpmii, PUNICODE_STRING pstrItem)</td></tr>
<tr class="separator:a9d9d8f1a139d1fbaf0101349df86c18a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5030ff00a9f25399eec051acd50fbc5b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00764.html#a5030ff00a9f25399eec051acd50fbc5b">_SetMenuItemInfoStruct</a> (<a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a> wFlags, <a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a> wIDNew, LPCWSTR lpszNew, LPMENUITEMINFO pmii, PUNICODE_STRING pstr)</td></tr>
<tr class="separator:a5030ff00a9f25399eec051acd50fbc5b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5bdb5d81a1e054208d5b5740210d9ccf"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00764.html#a5bdb5d81a1e054208d5b5740210d9ccf">FreeTypeData</a> (<a class="el" href="a00365.html#af18dd4dd192e00a176acc4dc89084f34">PMENU</a> pMenu, <a class="el" href="a00365.html#ab0258112d5896d2fea97153725ae601f">PITEM</a> pItem)</td></tr>
<tr class="separator:a5bdb5d81a1e054208d5b5740210d9ccf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a906695c6f4890acd6aad57e32e3a763e"><td class="memItemLeft" align="right" valign="top">void NEAR&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00764.html#a906695c6f4890acd6aad57e32e3a763e">FreePopup</a> (<a class="el" href="a00365.html#ab0258112d5896d2fea97153725ae601f">PITEM</a> pItem)</td></tr>
<tr class="separator:a906695c6f4890acd6aad57e32e3a763e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1dffa91dd8880b8d4d35725f9b1bf590"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00764.html#a1dffa91dd8880b8d4d35725f9b1bf590">MNFreeItem</a> (<a class="el" href="a00365.html#af18dd4dd192e00a176acc4dc89084f34">PMENU</a> pMenu, <a class="el" href="a00365.html#ab0258112d5896d2fea97153725ae601f">PITEM</a> pItem, BOOL fFreeItemPopup)</td></tr>
<tr class="separator:a1dffa91dd8880b8d4d35725f9b1bf590"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5441ac5610fd5ab2f26a669ed08f2764"><td class="memItemLeft" align="right" valign="top">BOOL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00764.html#a5441ac5610fd5ab2f26a669ed08f2764">RemoveDeleteMenuHelper</a> (<a class="el" href="a00365.html#af18dd4dd192e00a176acc4dc89084f34">PMENU</a> pMenu, <a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a> nPosition, <a class="el" href="a00563.html#a074685e97e89d6aa2accdfcb82328699">DWORD</a> wFlags, BOOL fDeleteMenu)</td></tr>
<tr class="separator:a5441ac5610fd5ab2f26a669ed08f2764"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a00d9140b3120a350cd599129e0201ccc"><td class="memItemLeft" align="right" valign="top">BOOL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00764.html#a00d9140b3120a350cd599129e0201ccc">_RemoveMenu</a> (<a class="el" href="a00365.html#af18dd4dd192e00a176acc4dc89084f34">PMENU</a> pMenu, <a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a> nPosition, <a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a> wFlags)</td></tr>
<tr class="separator:a00d9140b3120a350cd599129e0201ccc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abeea89075071b65376a2054fc95b1b56"><td class="memItemLeft" align="right" valign="top">BOOL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00764.html#abeea89075071b65376a2054fc95b1b56">_DeleteMenu</a> (<a class="el" href="a00365.html#af18dd4dd192e00a176acc4dc89084f34">PMENU</a> pMenu, <a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a> nPosition, <a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a> wFlags)</td></tr>
<tr class="separator:abeea89075071b65376a2054fc95b1b56"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a98d41eee1de000d62e454ae46a91f041"><td class="memItemLeft" align="right" valign="top">BOOL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00764.html#a98d41eee1de000d62e454ae46a91f041">_SetMenuContextHelpId</a> (<a class="el" href="a00365.html#af18dd4dd192e00a176acc4dc89084f34">PMENU</a> pMenu, <a class="el" href="a00563.html#a074685e97e89d6aa2accdfcb82328699">DWORD</a> dwContextHelpId)</td></tr>
<tr class="separator:a98d41eee1de000d62e454ae46a91f041"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">宏定义说明</h2>
<a id="a564740dd1ded698906e3d819f9e89d6d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a564740dd1ded698906e3d819f9e89d6d">&#9670;&nbsp;</a></span>CMENUITEMALLOC</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define CMENUITEMALLOC&#160;&#160;&#160;8</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00764_source.html">mnchange.c</a> 第 <a class="el" href="a00764_source.html#l00024">24</a> 行定义.</p>

</div>
</div>
<a id="aa2c6c7fa7e6bbe61abc18d745e6773a4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa2c6c7fa7e6bbe61abc18d745e6773a4">&#9670;&nbsp;</a></span>CMENUITEMDEALLOC</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define CMENUITEMDEALLOC&#160;&#160;&#160;10</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00764_source.html">mnchange.c</a> 第 <a class="el" href="a00764_source.html#l00025">25</a> 行定义.</p>

</div>
</div>
<h2 class="groupheader">类型定义说明</h2>
<a id="a05200040c4a28450c70e4d2f532c9ca2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a05200040c4a28450c70e4d2f532c9ca2">&#9670;&nbsp;</a></span>MENUAPIFN</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef BOOL(* MENUAPIFN) (<a class="el" href="a00365.html#af18dd4dd192e00a176acc4dc89084f34">PMENU</a>, <a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>, BOOL, LPMENUITEMINFOW)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00764_source.html">mnchange.c</a> 第 <a class="el" href="a00764_source.html#l00036">36</a> 行定义.</p>

</div>
</div>
<h2 class="groupheader">函数说明</h2>
<a id="abeea89075071b65376a2054fc95b1b56"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abeea89075071b65376a2054fc95b1b56">&#9670;&nbsp;</a></span>_DeleteMenu()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">BOOL _DeleteMenu </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00365.html#af18dd4dd192e00a176acc4dc89084f34">PMENU</a>&#160;</td>
          <td class="paramname"><em>pMenu</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>&#160;</td>
          <td class="paramname"><em>nPosition</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>&#160;</td>
          <td class="paramname"><em>wFlags</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00764_source.html">mnchange.c</a> 第 <a class="el" href="a00764_source.html#l00654">654</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00659"></a><span class="lineno">  659</span>&#160;{</div>
<div class="line"><a name="l00660"></a><span class="lineno">  660</span>&#160;    <a class="code" href="a02625.html">PMENU</a> pSystemMenu;</div>
<div class="line"><a name="l00661"></a><span class="lineno">  661</span>&#160;<span class="preprocessor">#ifdef MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00662"></a><span class="lineno">  662</span>&#160;    <a class="code" href="a00899.html#a70b09c3e2b495630f4205d34be505afb">CheckLock</a>(pMenu);</div>
<div class="line"><a name="l00663"></a><span class="lineno">  663</span>&#160;<span class="preprocessor">#endif // MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00664"></a><span class="lineno">  664</span>&#160; </div>
<div class="line"><a name="l00665"></a><span class="lineno">  665</span>&#160;    <span class="comment">// Nasty Hack to fix MSVC 1.5, they remove the close item</span></div>
<div class="line"><a name="l00666"></a><span class="lineno">  666</span>&#160;    <span class="comment">// from their system menu, so we prevent them from doing</span></div>
<div class="line"><a name="l00667"></a><span class="lineno">  667</span>&#160;    <span class="comment">// this and act like nothing happened ( ie return TRUE )</span></div>
<div class="line"><a name="l00668"></a><span class="lineno">  668</span>&#160;    <span class="comment">// Bug#8154, [t-arthb]</span></div>
<div class="line"><a name="l00669"></a><span class="lineno">  669</span>&#160; </div>
<div class="line"><a name="l00670"></a><span class="lineno">  670</span>&#160;    <span class="keywordflow">if</span> ( nPosition == 6 &amp;&amp;</div>
<div class="line"><a name="l00671"></a><span class="lineno">  671</span>&#160;        (wFlags &amp; MF_BYPOSITION) &amp;&amp;</div>
<div class="line"><a name="l00672"></a><span class="lineno">  672</span>&#160;        (pMenu-&gt;<a class="code" href="a02625.html#a472df270c88db7755093cd3ca1d1dee6">spwndNotify</a>) &amp;&amp;</div>
<div class="line"><a name="l00673"></a><span class="lineno">  673</span>&#160;        ! TestWF( pMenu-&gt;<a class="code" href="a02625.html#a472df270c88db7755093cd3ca1d1dee6">spwndNotify</a>, WFWIN40COMPAT ) &amp;&amp;</div>
<div class="line"><a name="l00674"></a><span class="lineno">  674</span>&#160;        TestWF( pMenu-&gt;<a class="code" href="a02625.html#a472df270c88db7755093cd3ca1d1dee6">spwndNotify</a>, WEFMDICHILD ) &amp;&amp;</div>
<div class="line"><a name="l00675"></a><span class="lineno">  675</span>&#160;        (pSystemMenu = <a class="code" href="a00203.html#a23e426afda41ba996c345e468634c3f3">GetSysMenuHandle</a>(pMenu-&gt;<a class="code" href="a02625.html#a472df270c88db7755093cd3ca1d1dee6">spwndNotify</a>)) &amp;&amp;</div>
<div class="line"><a name="l00676"></a><span class="lineno">  676</span>&#160;        (pSystemMenu-&gt;<a class="code" href="a02625.html#ae6172b08ed30615d88290ea4b4b6a70c">rgItems</a>[0].<a class="code" href="a02621.html#ac10ce08286532c51caca752ec8eb7e99">spSubMenu</a> == pMenu) )</div>
<div class="line"><a name="l00677"></a><span class="lineno">  677</span>&#160;     {</div>
<div class="line"><a name="l00678"></a><span class="lineno">  678</span>&#160;        <span class="keywordflow">return</span> TRUE;</div>
<div class="line"><a name="l00679"></a><span class="lineno">  679</span>&#160;     }</div>
<div class="line"><a name="l00680"></a><span class="lineno">  680</span>&#160; </div>
<div class="line"><a name="l00681"></a><span class="lineno">  681</span>&#160;<span class="preprocessor">#ifdef MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00682"></a><span class="lineno">  682</span>&#160;    <span class="keywordflow">return</span> xxxRemoveDeleteMenuHelper(pMenu, nPosition, wFlags, TRUE);</div>
<div class="line"><a name="l00683"></a><span class="lineno">  683</span>&#160;<span class="preprocessor">#else</span></div>
<div class="line"><a name="l00684"></a><span class="lineno">  684</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="a00764.html#a5441ac5610fd5ab2f26a669ed08f2764">RemoveDeleteMenuHelper</a>(pMenu, nPosition, wFlags, TRUE);</div>
<div class="line"><a name="l00685"></a><span class="lineno">  685</span>&#160;<span class="preprocessor">#endif // MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00686"></a><span class="lineno">  686</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00899.html#a70b09c3e2b495630f4205d34be505afb">CheckLock()</a>, <a class="el" href="a00203_source.html#l00436">GetSysMenuHandle()</a>, <a class="el" href="a00764_source.html#l00488">RemoveDeleteMenuHelper()</a>, <a class="el" href="a00365_source.html#l02005">tagMENU::rgItems</a> , 以及 <a class="el" href="a00365_source.html#l01962">tagITEM::spSubMenu</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a03614_source.html#l02741">NtUserDeleteMenu()</a> , 以及 <a class="el" href="a00635_source.html#l00031">xxxCreateWindowExWOW()</a>.</p>

</div>
</div>
<a id="a9d9d8f1a139d1fbaf0101349df86c18a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9d9d8f1a139d1fbaf0101349df86c18a">&#9670;&nbsp;</a></span>_InsertMenuItem()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">BOOL _InsertMenuItem </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00365.html#af18dd4dd192e00a176acc4dc89084f34">PMENU</a>&#160;</td>
          <td class="paramname"><em>pMenu</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>&#160;</td>
          <td class="paramname"><em>wIndex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">BOOL&#160;</td>
          <td class="paramname"><em>fByPosition</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">LPMENUITEMINFOW&#160;</td>
          <td class="paramname"><em>lpmii</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">PUNICODE_STRING&#160;</td>
          <td class="paramname"><em>pstrItem</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00764_source.html">mnchange.c</a> 第 <a class="el" href="a00764_source.html#l00161">161</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;{</div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;    <a class="code" href="a02621.html">PITEM</a> pItem;</div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160; </div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;    <a class="code" href="a02625.html">PMENU</a>           pMenuItemIsOn;</div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;    <a class="code" href="a02621.html">PITEM</a>           pNewItems;</div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;<span class="preprocessor">#ifdef MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;    <a class="code" href="a02837.html">PPOPUPMENU</a>      ppopup;</div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;    <a class="code" href="a01881.html">TL</a>              tlMenu;</div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160; </div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;    <a class="code" href="a00899.html#a70b09c3e2b495630f4205d34be505afb">CheckLock</a>(pMenu);</div>
<div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;<span class="preprocessor">#endif // MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;<span class="comment">// Find out where the item we are inserting should go.</span></div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;    <span class="keywordflow">if</span> (wIndex != MFMWFP_NOITEM) {</div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;        pItem = <a class="code" href="a00365.html#a600b2eecb3e014ccef3cbdb2b38209b5">MNLookUpItem</a>(pMenu, wIndex, fByPosition, &amp;pMenuItemIsOn);</div>
<div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160; </div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;        <span class="keywordflow">if</span> (pItem != NULL)</div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;            pMenu = pMenuItemIsOn;</div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;        <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;            wIndex = MFMWFP_NOITEM;</div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;        }</div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;    } <span class="keywordflow">else</span></div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;        pItem = NULL;</div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;<span class="preprocessor">#ifdef MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;    <span class="keywordflow">if</span> (pMenu-&gt;<a class="code" href="a02625.html#a3bf37b161e5822f38a2b0bc722c5ac50">cItems</a> &amp;&amp; (!(lpmii-&gt;fMask &amp; MIIM_BITMAP) || (lpmii-&gt;hbmpItem &gt;= (HBITMAP)MENUHBM_MAX)))</div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;<span class="preprocessor">#else // MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;    <span class="keywordflow">if</span> (pMenu-&gt;<a class="code" href="a02625.html#a3bf37b161e5822f38a2b0bc722c5ac50">cItems</a> &amp;&amp; (!(lpmii-&gt;fType &amp; MFT_BITMAP) || (lpmii-&gt;dwTypeData &gt;= (LPWSTR)MENUHBM_MAX)))</div>
<div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;<span class="preprocessor">#endif // MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;    {</div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;        <span class="comment">// keep normal menu items between the MDI system bitmap items</span></div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;        <a class="code" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a> wSave, w;</div>
<div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;        <a class="code" href="a02621.html">PITEM</a>  pItemWalk;</div>
<div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;        wSave = w = wIndex;</div>
<div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160; </div>
<div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;        <span class="keywordflow">if</span> (pItem &amp;&amp; !fByPosition)</div>
<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;            w = ((PBYTE)pItem - (PBYTE)(pMenu-&gt;<a class="code" href="a02625.html#ae6172b08ed30615d88290ea4b4b6a70c">rgItems</a>)) / <span class="keyword">sizeof</span>(<a class="code" href="a00365.html#a4e7bfddf7bbe2ec3b63691ccb9383fb5">ITEM</a>);</div>
<div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160; </div>
<div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;        <span class="keywordflow">if</span> (!w)</div>
<div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;        {</div>
<div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;            pItemWalk = pMenu-&gt;<a class="code" href="a02625.html#ae6172b08ed30615d88290ea4b4b6a70c">rgItems</a>;</div>
<div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;<span class="preprocessor">#ifdef MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;            <span class="keywordflow">if</span> ((pItemWalk-&gt;<a class="code" href="a02621.html#a7e2f0bd56b29ee245667384d07a03544">hbmp</a> == (HBITMAP)MENUHBM_SYSTEM))</div>
<div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;<span class="preprocessor">#else // MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;            <span class="keywordflow">if</span> ((pItemWalk-&gt;<a class="code" href="a02621.html#a3f9ea4a7b91779e27ebb2a33a1484545">fType</a> &amp; MFT_BITMAP) &amp;&amp; (pItemWalk-&gt;<a class="code" href="a02621.html#aeeb0fd843d821837779407bbd8ece0cf">hTypeData</a> == (HANDLE)MENUHBM_SYSTEM))</div>
<div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;#endif <span class="comment">//MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;                wIndex = 1;</div>
<div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;        }</div>
<div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;        <span class="keywordflow">else</span></div>
<div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;        {</div>
<div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;            <span class="keywordflow">if</span> (w == MFMWFP_NOITEM)</div>
<div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;                w = pMenu-&gt;<a class="code" href="a02625.html#a3bf37b161e5822f38a2b0bc722c5ac50">cItems</a>;</div>
<div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160; </div>
<div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;            w--;</div>
<div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;            pItemWalk = pMenu-&gt;<a class="code" href="a02625.html#ae6172b08ed30615d88290ea4b4b6a70c">rgItems</a> + w;</div>
<div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;<span class="preprocessor">#ifdef MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;            <span class="keywordflow">while</span> (w &amp;&amp; (pItemWalk-&gt;<a class="code" href="a02621.html#a7e2f0bd56b29ee245667384d07a03544">hbmp</a>) &amp;&amp; (pItemWalk-&gt;<a class="code" href="a02621.html#a7e2f0bd56b29ee245667384d07a03544">hbmp</a> &lt; (HBITMAP)MENUHBM_MAX))</div>
<div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;#<span class="keywordflow">else</span> <span class="comment">// MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;            <span class="keywordflow">while</span> (w &amp;&amp; (pItemWalk-&gt;<a class="code" href="a02621.html#a3f9ea4a7b91779e27ebb2a33a1484545">fType</a> &amp; MFT_BITMAP) &amp;&amp; (pItemWalk-&gt;<a class="code" href="a02621.html#aeeb0fd843d821837779407bbd8ece0cf">hTypeData</a> &lt; (HANDLE)MENUHBM_MAX))</div>
<div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160; </div>
<div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;#endif <span class="comment">// MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;            {</div>
<div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;                wIndex = w--;</div>
<div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;                pItemWalk--;</div>
<div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;            }</div>
<div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;        }</div>
<div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160; </div>
<div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;        <span class="keywordflow">if</span> (wIndex != wSave)</div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;            pItem = pMenu-&gt;<a class="code" href="a02625.html#ae6172b08ed30615d88290ea4b4b6a70c">rgItems</a> + wIndex;</div>
<div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;    }</div>
<div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160; </div>
<div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;    <span class="comment">// LATER -- we currently realloc every 10 items.  investigate the</span></div>
<div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;    <span class="comment">// performance hit/gain we get from this and adjust accordingly.</span></div>
<div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;    <span class="keywordflow">if</span> (pMenu-&gt;<a class="code" href="a02625.html#a3bf37b161e5822f38a2b0bc722c5ac50">cItems</a> &gt;= pMenu-&gt;<a class="code" href="a02625.html#a13b183d6135cf3858d71ba08802a8f71">cAlloced</a>) {</div>
<div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;        <span class="keywordflow">if</span> (pMenu-&gt;<a class="code" href="a02625.html#ae6172b08ed30615d88290ea4b4b6a70c">rgItems</a>) {</div>
<div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;            pNewItems = (<a class="code" href="a00365.html#ab0258112d5896d2fea97153725ae601f">PITEM</a>)DesktopAlloc(pMenu-&gt;<a class="code" href="a02625.html#a89169c528df8ad521ef1f85c782b1dc8">head</a>.rpdesk-&gt;hheapDesktop,</div>
<div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;                    (pMenu-&gt;<a class="code" href="a02625.html#a13b183d6135cf3858d71ba08802a8f71">cAlloced</a> + <a class="code" href="a00764.html#a564740dd1ded698906e3d819f9e89d6d">CMENUITEMALLOC</a>) * <span class="keyword">sizeof</span>(<a class="code" href="a00365.html#a4e7bfddf7bbe2ec3b63691ccb9383fb5">ITEM</a>));</div>
<div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;            <span class="keywordflow">if</span> (pNewItems) {</div>
<div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;                RtlCopyMemory(pNewItems, pMenu-&gt;<a class="code" href="a02625.html#ae6172b08ed30615d88290ea4b4b6a70c">rgItems</a>,</div>
<div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;                        pMenu-&gt;<a class="code" href="a02625.html#a13b183d6135cf3858d71ba08802a8f71">cAlloced</a> * <span class="keyword">sizeof</span>(<a class="code" href="a02621.html">ITEM</a>));</div>
<div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;<span class="preprocessor">#ifdef DEBUG</span></div>
<div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;                <span class="keywordflow">if</span> (<a class="code" href="a00695.html#a23820d208059540aed0ec5434de2de56">gfTrackLocks</a>) {</div>
<div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;                    RelocateMenuLockRecords(pNewItems, pMenu-&gt;<a class="code" href="a02625.html#a3bf37b161e5822f38a2b0bc722c5ac50">cItems</a>,</div>
<div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;                        ((PBYTE)pNewItems) - (PBYTE)(pMenu-&gt;<a class="code" href="a02625.html#ae6172b08ed30615d88290ea4b4b6a70c">rgItems</a>));</div>
<div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;                }</div>
<div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;                DesktopFree(pMenu-&gt;<a class="code" href="a02625.html#a89169c528df8ad521ef1f85c782b1dc8">head</a>.rpdesk-&gt;hheapDesktop, pMenu-&gt;<a class="code" href="a02625.html#ae6172b08ed30615d88290ea4b4b6a70c">rgItems</a>);</div>
<div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;            }</div>
<div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;        } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;            pNewItems = (<a class="code" href="a00365.html#ab0258112d5896d2fea97153725ae601f">PITEM</a>)DesktopAlloc(pMenu-&gt;<a class="code" href="a02625.html#a89169c528df8ad521ef1f85c782b1dc8">head</a>.rpdesk-&gt;hheapDesktop,</div>
<div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;                    <span class="keyword">sizeof</span>(<a class="code" href="a02621.html">ITEM</a>) * <a class="code" href="a00764.html#a564740dd1ded698906e3d819f9e89d6d">CMENUITEMALLOC</a>);</div>
<div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;        }</div>
<div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160; </div>
<div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;        <span class="keywordflow">if</span> (pNewItems == NULL)</div>
<div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;            <span class="keywordflow">return</span>(FALSE);</div>
<div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160; </div>
<div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;        pMenu-&gt;<a class="code" href="a02625.html#a13b183d6135cf3858d71ba08802a8f71">cAlloced</a> += <a class="code" href="a00764.html#a564740dd1ded698906e3d819f9e89d6d">CMENUITEMALLOC</a>;</div>
<div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;        pMenu-&gt;<a class="code" href="a02625.html#ae6172b08ed30615d88290ea4b4b6a70c">rgItems</a> = pNewItems;</div>
<div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160; </div>
<div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;<span class="comment">         * Now look up the item again since it probably moved when we realloced the</span></div>
<div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;<span class="comment">         * memory.</span></div>
<div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;        <span class="keywordflow">if</span> (wIndex != MFMWFP_NOITEM)</div>
<div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;            pItem = <a class="code" href="a00365.html#a600b2eecb3e014ccef3cbdb2b38209b5">MNLookUpItem</a>(pMenu, wIndex, fByPosition, &amp;pMenuItemIsOn);</div>
<div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160; </div>
<div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;    }</div>
<div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;    pMenu-&gt;<a class="code" href="a02625.html#a3bf37b161e5822f38a2b0bc722c5ac50">cItems</a>++;</div>
<div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160; </div>
<div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;    <span class="keywordflow">if</span> (pItem != NULL) {</div>
<div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;        <span class="comment">// Move this item up to make room for the one we want to insert.</span></div>
<div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;        memmove(pItem + 1, pItem, (pMenu-&gt;<a class="code" href="a02625.html#a3bf37b161e5822f38a2b0bc722c5ac50">cItems</a> - 1) *</div>
<div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160;                <span class="keyword">sizeof</span>(<a class="code" href="a02621.html">ITEM</a>) - ((<span class="keywordtype">char</span> *)pItem - (<span class="keywordtype">char</span> *)pMenu-&gt;<a class="code" href="a02625.html#ae6172b08ed30615d88290ea4b4b6a70c">rgItems</a>));</div>
<div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160;<span class="preprocessor">#ifdef DEBUG</span></div>
<div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;        <span class="keywordflow">if</span> (<a class="code" href="a00695.html#a23820d208059540aed0ec5434de2de56">gfTrackLocks</a>) {</div>
<div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;            RelocateMenuLockRecords(pItem + 1,</div>
<div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;                    &amp;(pMenu-&gt;<a class="code" href="a02625.html#ae6172b08ed30615d88290ea4b4b6a70c">rgItems</a>[pMenu-&gt;<a class="code" href="a02625.html#a3bf37b161e5822f38a2b0bc722c5ac50">cItems</a>]) - (pItem + 1),</div>
<div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;                    <span class="keyword">sizeof</span>(<a class="code" href="a02621.html">ITEM</a>));</div>
<div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;        }</div>
<div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;    } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160; </div>
<div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;        <span class="comment">// If lpItem is null, we will be inserting the item at the end of the</span></div>
<div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;        <span class="comment">// menu.</span></div>
<div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;        pItem = pMenu-&gt;<a class="code" href="a02625.html#ae6172b08ed30615d88290ea4b4b6a70c">rgItems</a> + pMenu-&gt;<a class="code" href="a02625.html#a3bf37b161e5822f38a2b0bc722c5ac50">cItems</a> - 1;</div>
<div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;    }</div>
<div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160; </div>
<div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;    <span class="comment">// Need to zero these fields in case we are inserting this item in the</span></div>
<div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160;    <span class="comment">// middle of the item list.</span></div>
<div class="line"><a name="l00295"></a><span class="lineno">  295</span>&#160; </div>
<div class="line"><a name="l00296"></a><span class="lineno">  296</span>&#160;    pItem-&gt;<a class="code" href="a02621.html#a3f9ea4a7b91779e27ebb2a33a1484545">fType</a>           = 0;</div>
<div class="line"><a name="l00297"></a><span class="lineno">  297</span>&#160;    pItem-&gt;<a class="code" href="a02621.html#a067bd58dd35ee07dea81d0b4a4e144ca">fState</a>          = 0;</div>
<div class="line"><a name="l00298"></a><span class="lineno">  298</span>&#160;    pItem-&gt;<a class="code" href="a02621.html#a549e2c4984de0719485737b35d6fc4b1">wID</a>             = 0;</div>
<div class="line"><a name="l00299"></a><span class="lineno">  299</span>&#160;    pItem-&gt;<a class="code" href="a02621.html#ac10ce08286532c51caca752ec8eb7e99">spSubMenu</a>       = NULL;</div>
<div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160;    pItem-&gt;<a class="code" href="a02621.html#a7287a955b880ce5bbb7e021b24abaf5e">hbmpChecked</a>     = NULL;</div>
<div class="line"><a name="l00301"></a><span class="lineno">  301</span>&#160;    pItem-&gt;<a class="code" href="a02621.html#a1923ac059473a15e16c90dab53178d43">hbmpUnchecked</a>   = NULL;</div>
<div class="line"><a name="l00302"></a><span class="lineno">  302</span>&#160;    pItem-&gt;<a class="code" href="a02621.html#aeeb0fd843d821837779407bbd8ece0cf">hTypeData</a>       = NULL;</div>
<div class="line"><a name="l00303"></a><span class="lineno">  303</span>&#160;    pItem-&gt;<a class="code" href="a02621.html#a1d342ea14e69d5eb171aa039c9bc4642">cch</a>             = 0;</div>
<div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160;    pItem-&gt;<a class="code" href="a02621.html#a433b5d21475241b192fa772448414ac3">dwItemData</a>      = 0;</div>
<div class="line"><a name="l00305"></a><span class="lineno">  305</span>&#160;    pItem-&gt;<a class="code" href="a02621.html#a1bd951bbc5c909b8bd138b83ddfe31bd">xItem</a>           = 0;</div>
<div class="line"><a name="l00306"></a><span class="lineno">  306</span>&#160;    pItem-&gt;<a class="code" href="a02621.html#add79d19081e05aa07fece764c9cc07b5">yItem</a>           = 0;</div>
<div class="line"><a name="l00307"></a><span class="lineno">  307</span>&#160;    pItem-&gt;<a class="code" href="a02621.html#ae0bdadacf987896fbfaf632d6e9f057c">cxItem</a>          = 0;</div>
<div class="line"><a name="l00308"></a><span class="lineno">  308</span>&#160;    pItem-&gt;<a class="code" href="a02621.html#aea89500b6f536eb62e40f363ee039f05">cyItem</a>          = 0;</div>
<div class="line"><a name="l00309"></a><span class="lineno">  309</span>&#160;<span class="preprocessor">#ifdef MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00310"></a><span class="lineno">  310</span>&#160;    pItem-&gt;<a class="code" href="a02621.html#a7e2f0bd56b29ee245667384d07a03544">hbmp</a>            = NULL;</div>
<div class="line"><a name="l00311"></a><span class="lineno">  311</span>&#160;    pItem-&gt;<a class="code" href="a02621.html#aee23f6e29ba54dcb506225dfc9504118">cxBmp</a>           = -1;</div>
<div class="line"><a name="l00312"></a><span class="lineno">  312</span>&#160;    pItem-&gt;<a class="code" href="a02621.html#ae6a647bf0c77d45824a9f70b01b33bae">cyBmp</a>           = -1;</div>
<div class="line"><a name="l00313"></a><span class="lineno">  313</span>&#160;    pItem-&gt;<a class="code" href="a02621.html#a8ddffda03875be635307092e985f7066">lpstr</a>           = NULL;</div>
<div class="line"><a name="l00314"></a><span class="lineno">  314</span>&#160;    <span class="keywordflow">if</span> (ppopup = MNCheckMenuUp(pMenu))</div>
<div class="line"><a name="l00315"></a><span class="lineno">  315</span>&#160;    {</div>
<div class="line"><a name="l00316"></a><span class="lineno">  316</span>&#160;        <span class="comment">// this menu is currently being displayed -- increment the selection</span></div>
<div class="line"><a name="l00317"></a><span class="lineno">  317</span>&#160;        <span class="comment">// pos if it is after the point of insertion</span></div>
<div class="line"><a name="l00318"></a><span class="lineno">  318</span>&#160;        <span class="keywordflow">if</span> (ppopup-&gt;<a class="code" href="a02837.html#a783d647af1c22968f32f520c9a1a1625">posSelectedItem</a> &gt;=</div>
<div class="line"><a name="l00319"></a><span class="lineno">  319</span>&#160;            (<span class="keywordtype">int</span>) ((pItem - pMenu-&gt;<a class="code" href="a02625.html#ae6172b08ed30615d88290ea4b4b6a70c">rgItems</a>) / <span class="keyword">sizeof</span>(<a class="code" href="a02621.html">ITEM</a>)) )</div>
<div class="line"><a name="l00320"></a><span class="lineno">  320</span>&#160;            ppopup-&gt;<a class="code" href="a02837.html#a783d647af1c22968f32f520c9a1a1625">posSelectedItem</a>++;</div>
<div class="line"><a name="l00321"></a><span class="lineno">  321</span>&#160;    }</div>
<div class="line"><a name="l00322"></a><span class="lineno">  322</span>&#160;    <a class="code" href="a00899.html#abfae1dfb48db23dcea4494f7990ad6a6">ThreadLock</a>(pMenu, &amp;tlMenu);</div>
<div class="line"><a name="l00323"></a><span class="lineno">  323</span>&#160;    <span class="keywordflow">if</span> (!xxxSetLPITEMInfo(pMenu, pItem, lpmii, pstrItem)) {</div>
<div class="line"><a name="l00324"></a><span class="lineno">  324</span>&#160;<span class="preprocessor">#else</span></div>
<div class="line"><a name="l00325"></a><span class="lineno">  325</span>&#160;    <span class="keywordflow">if</span> (!<a class="code" href="a00764.html#ab0badc85e28199cedd2e7fac69eaa798">SetLPITEMInfo</a>(pMenu, pItem, lpmii, pstrItem)) {</div>
<div class="line"><a name="l00326"></a><span class="lineno">  326</span>&#160;<span class="preprocessor">#endif // MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00327"></a><span class="lineno">  327</span>&#160;        <a class="code" href="a00764.html#a1dffa91dd8880b8d4d35725f9b1bf590">MNFreeItem</a>(pMenu, pItem, TRUE);</div>
<div class="line"><a name="l00328"></a><span class="lineno">  328</span>&#160; </div>
<div class="line"><a name="l00329"></a><span class="lineno">  329</span>&#160; </div>
<div class="line"><a name="l00330"></a><span class="lineno">  330</span>&#160;        <span class="comment">// Move things up since we removed/deleted the item</span></div>
<div class="line"><a name="l00331"></a><span class="lineno">  331</span>&#160;        memmove(pItem, pItem + 1, pMenu-&gt;<a class="code" href="a02625.html#a3bf37b161e5822f38a2b0bc722c5ac50">cItems</a> * (<a class="code" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>)<span class="keyword">sizeof</span>(<a class="code" href="a02621.html">ITEM</a>) +</div>
<div class="line"><a name="l00332"></a><span class="lineno">  332</span>&#160;            (<a class="code" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>)((<span class="keywordtype">char</span> *)&amp;pMenu-&gt;<a class="code" href="a02625.html#ae6172b08ed30615d88290ea4b4b6a70c">rgItems</a>[0] - (<span class="keywordtype">char</span> *)(pItem + 1)));</div>
<div class="line"><a name="l00333"></a><span class="lineno">  333</span>&#160;<span class="preprocessor">#ifdef DEBUG</span></div>
<div class="line"><a name="l00334"></a><span class="lineno">  334</span>&#160;        <span class="keywordflow">if</span> (<a class="code" href="a00695.html#a23820d208059540aed0ec5434de2de56">gfTrackLocks</a>) {</div>
<div class="line"><a name="l00335"></a><span class="lineno">  335</span>&#160;            RelocateMenuLockRecords(pItem,</div>
<div class="line"><a name="l00336"></a><span class="lineno">  336</span>&#160;                    &amp;(pMenu-&gt;<a class="code" href="a02625.html#ae6172b08ed30615d88290ea4b4b6a70c">rgItems</a>[pMenu-&gt;<a class="code" href="a02625.html#a3bf37b161e5822f38a2b0bc722c5ac50">cItems</a> - 1]) - pItem,</div>
<div class="line"><a name="l00337"></a><span class="lineno">  337</span>&#160;                    -(<span class="keywordtype">int</span>)<span class="keyword">sizeof</span>(<a class="code" href="a02621.html">ITEM</a>));</div>
<div class="line"><a name="l00338"></a><span class="lineno">  338</span>&#160;        }</div>
<div class="line"><a name="l00339"></a><span class="lineno">  339</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00340"></a><span class="lineno">  340</span>&#160;        pMenu-&gt;<a class="code" href="a02625.html#a3bf37b161e5822f38a2b0bc722c5ac50">cItems</a>--;</div>
<div class="line"><a name="l00341"></a><span class="lineno">  341</span>&#160;<span class="preprocessor">#ifdef MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00342"></a><span class="lineno">  342</span>&#160;        ThreadUnlock(&amp;tlMenu);</div>
<div class="line"><a name="l00343"></a><span class="lineno">  343</span>&#160;<span class="preprocessor">#endif // MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00344"></a><span class="lineno">  344</span>&#160;        <span class="keywordflow">return</span>(FALSE);</div>
<div class="line"><a name="l00345"></a><span class="lineno">  345</span>&#160;    }</div>
<div class="line"><a name="l00346"></a><span class="lineno">  346</span>&#160; </div>
<div class="line"><a name="l00347"></a><span class="lineno">  347</span>&#160;<span class="preprocessor">#ifdef MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00348"></a><span class="lineno">  348</span>&#160;    ThreadUnlock(&amp;tlMenu);</div>
<div class="line"><a name="l00349"></a><span class="lineno">  349</span>&#160;<span class="preprocessor">#endif // MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00350"></a><span class="lineno">  350</span>&#160;    <span class="keywordflow">return</span>(TRUE);</div>
<div class="line"><a name="l00351"></a><span class="lineno">  351</span>&#160; </div>
<div class="line"><a name="l00352"></a><span class="lineno">  352</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00365_source.html#l01972">tagITEM::cch</a>, <a class="el" href="a00899.html#a70b09c3e2b495630f4205d34be505afb">CheckLock()</a>, <a class="el" href="a00764_source.html#l00024">CMENUITEMALLOC</a>, <a class="el" href="a00365_source.html#l01984">tagITEM::cxBmp</a>, <a class="el" href="a00365_source.html#l01976">tagITEM::cxItem</a>, <a class="el" href="a00365_source.html#l01985">tagITEM::cyBmp</a>, <a class="el" href="a00365_source.html#l01978">tagITEM::cyItem</a>, <a class="el" href="a00365_source.html#l01973">tagITEM::dwItemData</a>, <a class="el" href="a00365_source.html#l01960">tagITEM::fState</a>, <a class="el" href="a00365_source.html#l01959">tagITEM::fType</a>, <a class="el" href="a00695_source.html#l00021">gfTrackLocks</a>, <a class="el" href="a00365_source.html#l01983">tagITEM::hbmp</a>, <a class="el" href="a00365_source.html#l01963">tagITEM::hbmpChecked</a>, <a class="el" href="a00365_source.html#l01964">tagITEM::hbmpUnchecked</a>, <a class="el" href="a00365_source.html#l01968">tagITEM::hTypeData</a>, <a class="el" href="a00365_source.html#l01966">tagITEM::lpstr</a>, <a class="el" href="a00764_source.html#l00454">MNFreeItem()</a>, <a class="el" href="a03752_source.html#l00334">MNLookUpItem()</a>, <a class="el" href="a00899_source.html#l01973">tagPOPUPMENU::posSelectedItem</a>, <a class="el" href="a00764_source.html#l00822">SetLPITEMInfo()</a>, <a class="el" href="a00365_source.html#l01962">tagITEM::spSubMenu</a>, <a class="el" href="a00899.html#abfae1dfb48db23dcea4494f7990ad6a6">ThreadLock()</a>, <a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT()</a>, <a class="el" href="a00365_source.html#l01961">tagITEM::wID</a>, <a class="el" href="a00365_source.html#l01974">tagITEM::xItem</a> , 以及 <a class="el" href="a00365_source.html#l01975">tagITEM::yItem</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a03614_source.html#l03419">NtUserThunkedMenuItemInfo()</a>.</p>

</div>
</div>
<a id="a00d9140b3120a350cd599129e0201ccc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a00d9140b3120a350cd599129e0201ccc">&#9670;&nbsp;</a></span>_RemoveMenu()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">BOOL _RemoveMenu </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00365.html#af18dd4dd192e00a176acc4dc89084f34">PMENU</a>&#160;</td>
          <td class="paramname"><em>pMenu</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>&#160;</td>
          <td class="paramname"><em>nPosition</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>&#160;</td>
          <td class="paramname"><em>wFlags</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00764_source.html">mnchange.c</a> 第 <a class="el" href="a00764_source.html#l00624">624</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00629"></a><span class="lineno">  629</span>&#160;{</div>
<div class="line"><a name="l00630"></a><span class="lineno">  630</span>&#160;<span class="preprocessor">#ifdef MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00631"></a><span class="lineno">  631</span>&#160;    <a class="code" href="a01881.html">TL</a> tlpMenu;</div>
<div class="line"><a name="l00632"></a><span class="lineno">  632</span>&#160;    BOOL fReturn = FALSE;</div>
<div class="line"><a name="l00633"></a><span class="lineno">  633</span>&#160;    <a class="code" href="a00899.html#a70b09c3e2b495630f4205d34be505afb">CheckLock</a>(pMenu);</div>
<div class="line"><a name="l00634"></a><span class="lineno">  634</span>&#160;    <a class="code" href="a00899.html#abfae1dfb48db23dcea4494f7990ad6a6">ThreadLock</a>(pMenu, &amp;tlpMenu);</div>
<div class="line"><a name="l00635"></a><span class="lineno">  635</span>&#160;    fReturn = xxxRemoveDeleteMenuHelper(pMenu, nPosition, wFlags, FALSE);</div>
<div class="line"><a name="l00636"></a><span class="lineno">  636</span>&#160;    ThreadUnlock(&amp;tlpMenu);</div>
<div class="line"><a name="l00637"></a><span class="lineno">  637</span>&#160;    <span class="keywordflow">return</span> fReturn;</div>
<div class="line"><a name="l00638"></a><span class="lineno">  638</span>&#160;<span class="preprocessor">#else</span></div>
<div class="line"><a name="l00639"></a><span class="lineno">  639</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="a00764.html#a5441ac5610fd5ab2f26a669ed08f2764">RemoveDeleteMenuHelper</a>(pMenu, nPosition, wFlags, FALSE);</div>
<div class="line"><a name="l00640"></a><span class="lineno">  640</span>&#160;<span class="preprocessor">#endif // MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00641"></a><span class="lineno">  641</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00899.html#a70b09c3e2b495630f4205d34be505afb">CheckLock()</a>, <a class="el" href="a00764_source.html#l00488">RemoveDeleteMenuHelper()</a> , 以及 <a class="el" href="a00899.html#abfae1dfb48db23dcea4494f7990ad6a6">ThreadLock()</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a03614_source.html#l04404">NtUserRemoveMenu()</a>.</p>

</div>
</div>
<a id="a98d41eee1de000d62e454ae46a91f041"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a98d41eee1de000d62e454ae46a91f041">&#9670;&nbsp;</a></span>_SetMenuContextHelpId()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">BOOL _SetMenuContextHelpId </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00365.html#af18dd4dd192e00a176acc4dc89084f34">PMENU</a>&#160;</td>
          <td class="paramname"><em>pMenu</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00563.html#a074685e97e89d6aa2accdfcb82328699">DWORD</a>&#160;</td>
          <td class="paramname"><em>dwContextHelpId</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00764_source.html">mnchange.c</a> 第 <a class="el" href="a00764_source.html#l00933">933</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00934"></a><span class="lineno">  934</span>&#160;{</div>
<div class="line"><a name="l00935"></a><span class="lineno">  935</span>&#160; </div>
<div class="line"><a name="l00936"></a><span class="lineno">  936</span>&#160;    <span class="comment">// Set the new context help Id;</span></div>
<div class="line"><a name="l00937"></a><span class="lineno">  937</span>&#160;    pMenu-&gt;<a class="code" href="a02625.html#a978db2c3ca45448bef67cdfdcf839355">dwContextHelpId</a> = dwContextHelpId;</div>
<div class="line"><a name="l00938"></a><span class="lineno">  938</span>&#160; </div>
<div class="line"><a name="l00939"></a><span class="lineno">  939</span>&#160;    <span class="keywordflow">return</span>(TRUE);  <span class="comment">// Success!</span></div>
<div class="line"><a name="l00940"></a><span class="lineno">  940</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00365_source.html#l02006">tagMENU::dwContextHelpId</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a03614_source.html#l03574">NtUserSetMenuContextHelpId()</a>.</p>

</div>
</div>
<a id="a4bee8199e47acc4dce08bdf3ecc0959e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4bee8199e47acc4dce08bdf3ecc0959e">&#9670;&nbsp;</a></span>_SetMenuItemInfo()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">BOOL _SetMenuItemInfo </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00365.html#af18dd4dd192e00a176acc4dc89084f34">PMENU</a>&#160;</td>
          <td class="paramname"><em>pMenu</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>&#160;</td>
          <td class="paramname"><em>wIndex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">BOOL&#160;</td>
          <td class="paramname"><em>fByPosition</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">LPMENUITEMINFOW&#160;</td>
          <td class="paramname"><em>lpmii</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">PUNICODE_STRING&#160;</td>
          <td class="paramname"><em>pstrItem</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Global Insert/Append/Set client/server interface </p>
<p>01-13-94 FritzS Created </p>

<p class="definition">在文件 <a class="el" href="a00764_source.html">mnchange.c</a> 第 <a class="el" href="a00764_source.html#l00062">62</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;{</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160; </div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;    <a class="code" href="a02621.html">PITEM</a> pItem;</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;<span class="preprocessor">#ifdef MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;    <a class="code" href="a00899.html#a70b09c3e2b495630f4205d34be505afb">CheckLock</a>(pMenu);</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;<span class="preprocessor">#endif // MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;    pItem = <a class="code" href="a00365.html#a600b2eecb3e014ccef3cbdb2b38209b5">MNLookUpItem</a>(pMenu, wIndex, fByPosition,NULL);</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;    <span class="keywordflow">if</span> (pItem == NULL) {</div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;<span class="comment">         * Word doesn&#39;t like not finding SC_TASKLIST -- so it that&#39;s what</span></div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;<span class="comment">         * they&#39;re looking for, let&#39;s pretend we changed it.</span></div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;        <span class="keywordflow">if</span> (!fByPosition &amp;&amp; (wIndex == SC_TASKLIST))</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;            <span class="keywordflow">return</span> TRUE;</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160; </div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;<span class="comment">         * Item not found.  Return false.</span></div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;        <a class="code" href="a00371.html#ae61d954062a9ece52e350e54cad9a23d">RIPERR0</a>(ERROR_MENU_ITEM_NOT_FOUND, <a class="code" href="a00371.html#a41f433389f20db57f042022a662e96de">RIP_WARNING</a>, <span class="stringliteral">&quot;ModifyMenu: Menu item not found&quot;</span>);</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;        <span class="keywordflow">return</span> FALSE;</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;    }</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;<span class="preprocessor">#ifdef MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;    <span class="keywordflow">return</span> xxxSetLPITEMInfo(pMenu, pItem, lpmii, pstrItem);</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;<span class="preprocessor">#else // MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="a00764.html#ab0badc85e28199cedd2e7fac69eaa798">SetLPITEMInfo</a>(pMenu, pItem, lpmii, pstrItem);</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;<span class="preprocessor">#endif // MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00899.html#a70b09c3e2b495630f4205d34be505afb">CheckLock()</a>, <a class="el" href="a03752_source.html#l00334">MNLookUpItem()</a>, <a class="el" href="a00371_source.html#l00029">RIP_WARNING</a>, <a class="el" href="a00371_source.html#l00119">RIPERR0</a> , 以及 <a class="el" href="a00764_source.html#l00822">SetLPITEMInfo()</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a03614_source.html#l03419">NtUserThunkedMenuItemInfo()</a>.</p>

</div>
</div>
<a id="a5030ff00a9f25399eec051acd50fbc5b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5030ff00a9f25399eec051acd50fbc5b">&#9670;&nbsp;</a></span>_SetMenuItemInfoStruct()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void _SetMenuItemInfoStruct </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>&#160;</td>
          <td class="paramname"><em>wFlags</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>&#160;</td>
          <td class="paramname"><em>wIDNew</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">LPCWSTR&#160;</td>
          <td class="paramname"><em>lpszNew</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">LPMENUITEMINFO&#160;</td>
          <td class="paramname"><em>pmii</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">PUNICODE_STRING&#160;</td>
          <td class="paramname"><em>pstr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00764_source.html">mnchange.c</a> 第 <a class="el" href="a00764_source.html#l00354">354</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00360"></a><span class="lineno">  360</span>&#160;{</div>
<div class="line"><a name="l00361"></a><span class="lineno">  361</span>&#160;<span class="preprocessor">#ifdef MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00362"></a><span class="lineno">  362</span>&#160;    pmii-&gt;fMask = MIIM_STATE | MIIM_ID | MIIM_FTYPE;</div>
<div class="line"><a name="l00363"></a><span class="lineno">  363</span>&#160;<span class="preprocessor">#else // MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00364"></a><span class="lineno">  364</span>&#160;    pmii-&gt;fMask = MIIM_STATE | MIIM_ID | MIIM_TYPE;</div>
<div class="line"><a name="l00365"></a><span class="lineno">  365</span>&#160; </div>
<div class="line"><a name="l00366"></a><span class="lineno">  366</span>&#160;<span class="preprocessor">#endif // MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00367"></a><span class="lineno">  367</span>&#160;    <span class="keywordflow">if</span> (wFlags &amp; MF_POPUP) {</div>
<div class="line"><a name="l00368"></a><span class="lineno">  368</span>&#160;        pmii-&gt;fMask |= MIIM_SUBMENU;</div>
<div class="line"><a name="l00369"></a><span class="lineno">  369</span>&#160;        pmii-&gt;hSubMenu = (HMENU)wIDNew;</div>
<div class="line"><a name="l00370"></a><span class="lineno">  370</span>&#160;    }</div>
<div class="line"><a name="l00371"></a><span class="lineno">  371</span>&#160; </div>
<div class="line"><a name="l00372"></a><span class="lineno">  372</span>&#160;    <span class="keywordflow">if</span> (wFlags &amp; MF_OWNERDRAW) {</div>
<div class="line"><a name="l00373"></a><span class="lineno">  373</span>&#160;        pmii-&gt;fMask |= MIIM_DATA;</div>
<div class="line"><a name="l00374"></a><span class="lineno">  374</span>&#160;        pmii-&gt;dwItemData = (<a class="code" href="a00563.html#a074685e97e89d6aa2accdfcb82328699">DWORD</a>) lpszNew;</div>
<div class="line"><a name="l00375"></a><span class="lineno">  375</span>&#160;    }</div>
<div class="line"><a name="l00376"></a><span class="lineno">  376</span>&#160; </div>
<div class="line"><a name="l00377"></a><span class="lineno">  377</span>&#160;    pmii-&gt;fState      = wFlags &amp; MFS_OLDAPI_MASK;</div>
<div class="line"><a name="l00378"></a><span class="lineno">  378</span>&#160;    pmii-&gt;fType       = wFlags &amp; MFT_OLDAPI_MASK;</div>
<div class="line"><a name="l00379"></a><span class="lineno">  379</span>&#160;    pmii-&gt;wID         = wIDNew;</div>
<div class="line"><a name="l00380"></a><span class="lineno">  380</span>&#160;    pmii-&gt;dwTypeData  = (LPWSTR) lpszNew;</div>
<div class="line"><a name="l00381"></a><span class="lineno">  381</span>&#160;<span class="preprocessor">#ifdef MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00382"></a><span class="lineno">  382</span>&#160;    <span class="keywordflow">if</span> (wFlags &amp; MIIM_STRING)</div>
<div class="line"><a name="l00383"></a><span class="lineno">  383</span>&#160;<span class="preprocessor">#else // MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00384"></a><span class="lineno">  384</span>&#160;    <span class="keywordflow">if</span> (!(pmii-&gt;fType &amp; MFT_NONSTRING))</div>
<div class="line"><a name="l00385"></a><span class="lineno">  385</span>&#160;#endif <span class="comment">// MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00386"></a><span class="lineno">  386</span>&#160;        RtlInitUnicodeString(pstr, lpszNew);</div>
<div class="line"><a name="l00387"></a><span class="lineno">  387</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00563_source.html#l00175">DWORD</a>.</p>

</div>
</div>
<a id="a906695c6f4890acd6aad57e32e3a763e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a906695c6f4890acd6aad57e32e3a763e">&#9670;&nbsp;</a></span>FreePopup()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void NEAR FreePopup </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00365.html#ab0258112d5896d2fea97153725ae601f">PITEM</a>&#160;</td>
          <td class="paramname"><em>pItem</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00764_source.html">mnchange.c</a> 第 <a class="el" href="a00764_source.html#l00438">438</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00439"></a><span class="lineno">  439</span>&#160;{</div>
<div class="line"><a name="l00440"></a><span class="lineno">  440</span>&#160;    <span class="keywordflow">if</span> (pItem-&gt;<a class="code" href="a02621.html#ac10ce08286532c51caca752ec8eb7e99">spSubMenu</a> != NULL) {</div>
<div class="line"><a name="l00441"></a><span class="lineno">  441</span>&#160;        <a class="code" href="a00776.html#a39c71da1ccf5728e77c34be3cffb99d8">_DestroyMenu</a>(pItem-&gt;<a class="code" href="a02621.html#ac10ce08286532c51caca752ec8eb7e99">spSubMenu</a>);</div>
<div class="line"><a name="l00442"></a><span class="lineno">  442</span>&#160;    }</div>
<div class="line"><a name="l00443"></a><span class="lineno">  443</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00776_source.html#l00027">_DestroyMenu()</a> , 以及 <a class="el" href="a00365_source.html#l01962">tagITEM::spSubMenu</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a00764_source.html#l00454">MNFreeItem()</a> , 以及 <a class="el" href="a00764_source.html#l00822">SetLPITEMInfo()</a>.</p>

</div>
</div>
<a id="a5bdb5d81a1e054208d5b5740210d9ccf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5bdb5d81a1e054208d5b5740210d9ccf">&#9670;&nbsp;</a></span>FreeTypeData()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void FreeTypeData </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00365.html#af18dd4dd192e00a176acc4dc89084f34">PMENU</a>&#160;</td>
          <td class="paramname"><em>pMenu</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00365.html#ab0258112d5896d2fea97153725ae601f">PITEM</a>&#160;</td>
          <td class="paramname"><em>pItem</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00764_source.html">mnchange.c</a> 第 <a class="el" href="a00764_source.html#l00390">390</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00391"></a><span class="lineno">  391</span>&#160;{</div>
<div class="line"><a name="l00392"></a><span class="lineno">  392</span>&#160;    <span class="comment">// Free up hItem unless it&#39;s a bitmap handle or nonexistent.</span></div>
<div class="line"><a name="l00393"></a><span class="lineno">  393</span>&#160;    <span class="comment">// Apps are responsible for freeing their bitmaps.</span></div>
<div class="line"><a name="l00394"></a><span class="lineno">  394</span>&#160;    <span class="keywordflow">if</span> (!TestMFT(pItem, MFT_NONSTRING) &amp;&amp; (pItem-&gt;<a class="code" href="a02621.html#aeeb0fd843d821837779407bbd8ece0cf">hTypeData</a> != NULL))</div>
<div class="line"><a name="l00395"></a><span class="lineno">  395</span>&#160;        DesktopFree(pMenu-&gt;<a class="code" href="a02625.html#a89169c528df8ad521ef1f85c782b1dc8">head</a>.rpdesk-&gt;hheapDesktop, pItem-&gt;<a class="code" href="a02621.html#aeeb0fd843d821837779407bbd8ece0cf">hTypeData</a>);</div>
<div class="line"><a name="l00396"></a><span class="lineno">  396</span>&#160; </div>
<div class="line"><a name="l00397"></a><span class="lineno">  397</span>&#160;    <span class="keywordflow">if</span> (TestMFT(pItem, MFT_BITMAP)) {</div>
<div class="line"><a name="l00398"></a><span class="lineno">  398</span>&#160;            <span class="comment">/*</span></div>
<div class="line"><a name="l00399"></a><span class="lineno">  399</span>&#160;<span class="comment">             * Assign ownership of the bitmap to the process that is</span></div>
<div class="line"><a name="l00400"></a><span class="lineno">  400</span>&#160;<span class="comment">             * destroying the menu to ensure that bitmap will</span></div>
<div class="line"><a name="l00401"></a><span class="lineno">  401</span>&#160;<span class="comment">             * eventually be destroyed.</span></div>
<div class="line"><a name="l00402"></a><span class="lineno">  402</span>&#160;<span class="comment">             */</span></div>
<div class="line"><a name="l00403"></a><span class="lineno">  403</span>&#160;        GreSetBitmapOwner((HBITMAP)(pItem-&gt;<a class="code" href="a02621.html#aeeb0fd843d821837779407bbd8ece0cf">hTypeData</a>), OBJECT_OWNER_CURRENT);</div>
<div class="line"><a name="l00404"></a><span class="lineno">  404</span>&#160;    }</div>
<div class="line"><a name="l00405"></a><span class="lineno">  405</span>&#160; </div>
<div class="line"><a name="l00406"></a><span class="lineno">  406</span>&#160;    <span class="comment">// Zap this pointer in case we try to free or reference it again</span></div>
<div class="line"><a name="l00407"></a><span class="lineno">  407</span>&#160;    pItem-&gt;<a class="code" href="a02621.html#aeeb0fd843d821837779407bbd8ece0cf">hTypeData</a>  = NULL;</div>
<div class="line"><a name="l00408"></a><span class="lineno">  408</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00365_source.html#l01993">tagMENU::head</a> , 以及 <a class="el" href="a00365_source.html#l01968">tagITEM::hTypeData</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a00764_source.html#l00454">MNFreeItem()</a> , 以及 <a class="el" href="a00764_source.html#l00822">SetLPITEMInfo()</a>.</p>

</div>
</div>
<a id="a1dffa91dd8880b8d4d35725f9b1bf590"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1dffa91dd8880b8d4d35725f9b1bf590">&#9670;&nbsp;</a></span>MNFreeItem()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void MNFreeItem </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00365.html#af18dd4dd192e00a176acc4dc89084f34">PMENU</a>&#160;</td>
          <td class="paramname"><em>pMenu</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00365.html#ab0258112d5896d2fea97153725ae601f">PITEM</a>&#160;</td>
          <td class="paramname"><em>pItem</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">BOOL&#160;</td>
          <td class="paramname"><em>fFreeItemPopup</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00764_source.html">mnchange.c</a> 第 <a class="el" href="a00764_source.html#l00454">454</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00458"></a><span class="lineno">  458</span>&#160;{</div>
<div class="line"><a name="l00459"></a><span class="lineno">  459</span>&#160;<span class="preprocessor">#ifdef MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00460"></a><span class="lineno">  460</span>&#160;    FreeItemBitmap(pMenu, pItem);</div>
<div class="line"><a name="l00461"></a><span class="lineno">  461</span>&#160;    FreeItemString(pMenu, pItem);</div>
<div class="line"><a name="l00462"></a><span class="lineno">  462</span>&#160;<span class="preprocessor">#else // MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00463"></a><span class="lineno">  463</span>&#160;    <a class="code" href="a00764.html#a5bdb5d81a1e054208d5b5740210d9ccf">FreeTypeData</a>(pMenu, pItem);</div>
<div class="line"><a name="l00464"></a><span class="lineno">  464</span>&#160;<span class="preprocessor">#endif //MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00465"></a><span class="lineno">  465</span>&#160; </div>
<div class="line"><a name="l00466"></a><span class="lineno">  466</span>&#160;    <span class="keywordflow">if</span> (fFreeItemPopup)</div>
<div class="line"><a name="l00467"></a><span class="lineno">  467</span>&#160;        <a class="code" href="a00764.html#a906695c6f4890acd6aad57e32e3a763e">FreePopup</a>(pItem);</div>
<div class="line"><a name="l00468"></a><span class="lineno">  468</span>&#160; </div>
<div class="line"><a name="l00469"></a><span class="lineno">  469</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00470"></a><span class="lineno">  470</span>&#160;<span class="comment">         * This&#39;ll work: the item didn&#39;t go away if it was locked.</span></div>
<div class="line"><a name="l00471"></a><span class="lineno">  471</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00472"></a><span class="lineno">  472</span>&#160;    Unlock(&amp;pItem-&gt;<a class="code" href="a02621.html#ac10ce08286532c51caca752ec8eb7e99">spSubMenu</a>);</div>
<div class="line"><a name="l00473"></a><span class="lineno">  473</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00764_source.html#l00438">FreePopup()</a>, <a class="el" href="a00764_source.html#l00390">FreeTypeData()</a> , 以及 <a class="el" href="a00365_source.html#l01962">tagITEM::spSubMenu</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a00776_source.html#l00027">_DestroyMenu()</a>, <a class="el" href="a00764_source.html#l00161">_InsertMenuItem()</a> , 以及 <a class="el" href="a00764_source.html#l00488">RemoveDeleteMenuHelper()</a>.</p>

</div>
</div>
<a id="a5441ac5610fd5ab2f26a669ed08f2764"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5441ac5610fd5ab2f26a669ed08f2764">&#9670;&nbsp;</a></span>RemoveDeleteMenuHelper()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">BOOL RemoveDeleteMenuHelper </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00365.html#af18dd4dd192e00a176acc4dc89084f34">PMENU</a>&#160;</td>
          <td class="paramname"><em>pMenu</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>&#160;</td>
          <td class="paramname"><em>nPosition</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00563.html#a074685e97e89d6aa2accdfcb82328699">DWORD</a>&#160;</td>
          <td class="paramname"><em>wFlags</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">BOOL&#160;</td>
          <td class="paramname"><em>fDeleteMenu</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00764_source.html">mnchange.c</a> 第 <a class="el" href="a00764_source.html#l00488">488</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00494"></a><span class="lineno">  494</span>&#160;{</div>
<div class="line"><a name="l00495"></a><span class="lineno">  495</span>&#160;    <a class="code" href="a02621.html">PITEM</a>  pItem;</div>
<div class="line"><a name="l00496"></a><span class="lineno">  496</span>&#160;    <a class="code" href="a02621.html">PITEM</a>  pNewItems;</div>
<div class="line"><a name="l00497"></a><span class="lineno">  497</span>&#160;    <a class="code" href="a02625.html">PMENU</a>  pMenuSave;</div>
<div class="line"><a name="l00498"></a><span class="lineno">  498</span>&#160; </div>
<div class="line"><a name="l00499"></a><span class="lineno">  499</span>&#160;<span class="preprocessor">#ifdef MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00500"></a><span class="lineno">  500</span>&#160;    <a class="code" href="a02837.html">PPOPUPMENU</a> ppopup;</div>
<div class="line"><a name="l00501"></a><span class="lineno">  501</span>&#160;    <a class="code" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>       uiPos = 0;</div>
<div class="line"><a name="l00502"></a><span class="lineno">  502</span>&#160; </div>
<div class="line"><a name="l00503"></a><span class="lineno">  503</span>&#160;    <a class="code" href="a00899.html#a70b09c3e2b495630f4205d34be505afb">CheckLock</a>(pMenu);</div>
<div class="line"><a name="l00504"></a><span class="lineno">  504</span>&#160;<span class="preprocessor">#endif // MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00505"></a><span class="lineno">  505</span>&#160; </div>
<div class="line"><a name="l00506"></a><span class="lineno">  506</span>&#160;    pMenuSave = pMenu;</div>
<div class="line"><a name="l00507"></a><span class="lineno">  507</span>&#160; </div>
<div class="line"><a name="l00508"></a><span class="lineno">  508</span>&#160;    pItem = <a class="code" href="a00365.html#a600b2eecb3e014ccef3cbdb2b38209b5">MNLookUpItem</a>(pMenu, nPosition, (BOOL) (wFlags &amp; MF_BYPOSITION), &amp;pMenu);</div>
<div class="line"><a name="l00509"></a><span class="lineno">  509</span>&#160;    <span class="keywordflow">if</span> (pItem == NULL) {</div>
<div class="line"><a name="l00510"></a><span class="lineno">  510</span>&#160; </div>
<div class="line"><a name="l00511"></a><span class="lineno">  511</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00512"></a><span class="lineno">  512</span>&#160;<span class="comment">         * Hack for apps written for Win95. In Win95 the prototype for</span></div>
<div class="line"><a name="l00513"></a><span class="lineno">  513</span>&#160;<span class="comment">         * this function was with &#39;WORD nPosition&#39; and because of this</span></div>
<div class="line"><a name="l00514"></a><span class="lineno">  514</span>&#160;<span class="comment">         * the HIWORD(nPosition) got set to 0.</span></div>
<div class="line"><a name="l00515"></a><span class="lineno">  515</span>&#160;<span class="comment">         * We are doing this just for system menu commands.</span></div>
<div class="line"><a name="l00516"></a><span class="lineno">  516</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00517"></a><span class="lineno">  517</span>&#160;        <span class="keywordflow">if</span> (nPosition &gt;= 0xFFFFF000 &amp;&amp; !(wFlags &amp; MF_BYPOSITION)) {</div>
<div class="line"><a name="l00518"></a><span class="lineno">  518</span>&#160;            nPosition &amp;= 0x0000FFFF;</div>
<div class="line"><a name="l00519"></a><span class="lineno">  519</span>&#160;            pMenu = pMenuSave;</div>
<div class="line"><a name="l00520"></a><span class="lineno">  520</span>&#160;            pItem = <a class="code" href="a00365.html#a600b2eecb3e014ccef3cbdb2b38209b5">MNLookUpItem</a>(pMenu, nPosition, FALSE, &amp;pMenu);</div>
<div class="line"><a name="l00521"></a><span class="lineno">  521</span>&#160; </div>
<div class="line"><a name="l00522"></a><span class="lineno">  522</span>&#160;            <span class="keywordflow">if</span> (pItem == NULL)</div>
<div class="line"><a name="l00523"></a><span class="lineno">  523</span>&#160;                <span class="keywordflow">return</span> FALSE;</div>
<div class="line"><a name="l00524"></a><span class="lineno">  524</span>&#160;        } <span class="keywordflow">else</span></div>
<div class="line"><a name="l00525"></a><span class="lineno">  525</span>&#160;            <span class="keywordflow">return</span> FALSE;</div>
<div class="line"><a name="l00526"></a><span class="lineno">  526</span>&#160;    }</div>
<div class="line"><a name="l00527"></a><span class="lineno">  527</span>&#160; </div>
<div class="line"><a name="l00528"></a><span class="lineno">  528</span>&#160;<span class="preprocessor">#ifdef MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00529"></a><span class="lineno">  529</span>&#160;    <span class="keywordflow">if</span> (ppopup = MNCheckMenuUp(pMenu))</div>
<div class="line"><a name="l00530"></a><span class="lineno">  530</span>&#160;    {</div>
<div class="line"><a name="l00531"></a><span class="lineno">  531</span>&#160;        <span class="comment">// this menu is currently being displayed -- decrement the selection</span></div>
<div class="line"><a name="l00532"></a><span class="lineno">  532</span>&#160;        <span class="comment">// pos if it is after the point of deletion; clear selection pos if it</span></div>
<div class="line"><a name="l00533"></a><span class="lineno">  533</span>&#160;        <span class="comment">// is AT the point of deletion</span></div>
<div class="line"><a name="l00534"></a><span class="lineno">  534</span>&#160;        uiPos = ((pItem - pMenu-&gt;<a class="code" href="a02625.html#ae6172b08ed30615d88290ea4b4b6a70c">rgItems</a>) / <span class="keyword">sizeof</span>(<a class="code" href="a02621.html">ITEM</a>));</div>
<div class="line"><a name="l00535"></a><span class="lineno">  535</span>&#160;        <span class="keywordflow">if</span> (ppopup-&gt;<a class="code" href="a02837.html#a783d647af1c22968f32f520c9a1a1625">posSelectedItem</a> == uiPos)</div>
<div class="line"><a name="l00536"></a><span class="lineno">  536</span>&#160;            ppopup-&gt;<a class="code" href="a02837.html#a783d647af1c22968f32f520c9a1a1625">posSelectedItem</a> = 0xffff;<span class="comment">// MI_NONE;</span></div>
<div class="line"><a name="l00537"></a><span class="lineno">  537</span>&#160;        <span class="keywordflow">else</span> <span class="keywordflow">if</span> (ppopup-&gt;<a class="code" href="a02837.html#a783d647af1c22968f32f520c9a1a1625">posSelectedItem</a> &gt; uiPos)</div>
<div class="line"><a name="l00538"></a><span class="lineno">  538</span>&#160;            ppopup-&gt;<a class="code" href="a02837.html#a783d647af1c22968f32f520c9a1a1625">posSelectedItem</a>--;</div>
<div class="line"><a name="l00539"></a><span class="lineno">  539</span>&#160;    }</div>
<div class="line"><a name="l00540"></a><span class="lineno">  540</span>&#160;<span class="preprocessor">#endif // MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00541"></a><span class="lineno">  541</span>&#160;    <a class="code" href="a00764.html#a1dffa91dd8880b8d4d35725f9b1bf590">MNFreeItem</a>(pMenu, pItem, fDeleteMenu);</div>
<div class="line"><a name="l00542"></a><span class="lineno">  542</span>&#160; </div>
<div class="line"><a name="l00543"></a><span class="lineno">  543</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00544"></a><span class="lineno">  544</span>&#160;<span class="comment">     * Reset the menu size so that it gets recomputed next time.</span></div>
<div class="line"><a name="l00545"></a><span class="lineno">  545</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00546"></a><span class="lineno">  546</span>&#160;    pMenu-&gt;<a class="code" href="a02625.html#a73d4a10b8c15f8ec2182bcb38dc6f350">cyMenu</a> = pMenu-&gt;<a class="code" href="a02625.html#af559c520a727e31f567b284c34f18a5e">cxMenu</a> = 0;</div>
<div class="line"><a name="l00547"></a><span class="lineno">  547</span>&#160; </div>
<div class="line"><a name="l00548"></a><span class="lineno">  548</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00549"></a><span class="lineno">  549</span>&#160;<span class="comment">     * Chicago removed the counterpart to this line (hMenu-&gt;hwndNotify = 0)</span></div>
<div class="line"><a name="l00550"></a><span class="lineno">  550</span>&#160;<span class="comment">     * We probably still need for deref</span></div>
<div class="line"><a name="l00551"></a><span class="lineno">  551</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00552"></a><span class="lineno">  552</span>&#160;    Unlock(&amp;pMenu-&gt;<a class="code" href="a02625.html#a472df270c88db7755093cd3ca1d1dee6">spwndNotify</a>);</div>
<div class="line"><a name="l00553"></a><span class="lineno">  553</span>&#160; </div>
<div class="line"><a name="l00554"></a><span class="lineno">  554</span>&#160;    <span class="keywordflow">if</span> (pMenu-&gt;<a class="code" href="a02625.html#a3bf37b161e5822f38a2b0bc722c5ac50">cItems</a> == 1) {</div>
<div class="line"><a name="l00555"></a><span class="lineno">  555</span>&#160;        DesktopFree(pMenu-&gt;<a class="code" href="a02625.html#a89169c528df8ad521ef1f85c782b1dc8">head</a>.rpdesk-&gt;hheapDesktop, pMenu-&gt;<a class="code" href="a02625.html#ae6172b08ed30615d88290ea4b4b6a70c">rgItems</a>);</div>
<div class="line"><a name="l00556"></a><span class="lineno">  556</span>&#160;        pMenu-&gt;<a class="code" href="a02625.html#a13b183d6135cf3858d71ba08802a8f71">cAlloced</a> = 0;</div>
<div class="line"><a name="l00557"></a><span class="lineno">  557</span>&#160;        pNewItems = NULL;</div>
<div class="line"><a name="l00558"></a><span class="lineno">  558</span>&#160;    } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00559"></a><span class="lineno">  559</span>&#160; </div>
<div class="line"><a name="l00560"></a><span class="lineno">  560</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00561"></a><span class="lineno">  561</span>&#160;<span class="comment">         * Move things up since we removed/deleted the item</span></div>
<div class="line"><a name="l00562"></a><span class="lineno">  562</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00563"></a><span class="lineno">  563</span>&#160; </div>
<div class="line"><a name="l00564"></a><span class="lineno">  564</span>&#160;        memmove(pItem, pItem + 1, pMenu-&gt;<a class="code" href="a02625.html#a3bf37b161e5822f38a2b0bc722c5ac50">cItems</a> * (<a class="code" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>)<span class="keyword">sizeof</span>(<a class="code" href="a02621.html">ITEM</a>) +</div>
<div class="line"><a name="l00565"></a><span class="lineno">  565</span>&#160;                (<a class="code" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>)((<span class="keywordtype">char</span> *)&amp;pMenu-&gt;<a class="code" href="a02625.html#ae6172b08ed30615d88290ea4b4b6a70c">rgItems</a>[0] - (<span class="keywordtype">char</span> *)(pItem + 1)));</div>
<div class="line"><a name="l00566"></a><span class="lineno">  566</span>&#160;<span class="preprocessor">#ifdef DEBUG</span></div>
<div class="line"><a name="l00567"></a><span class="lineno">  567</span>&#160;        <span class="keywordflow">if</span> (<a class="code" href="a00695.html#a23820d208059540aed0ec5434de2de56">gfTrackLocks</a>) {</div>
<div class="line"><a name="l00568"></a><span class="lineno">  568</span>&#160;            RelocateMenuLockRecords(pItem,</div>
<div class="line"><a name="l00569"></a><span class="lineno">  569</span>&#160;                    &amp;(pMenu-&gt;<a class="code" href="a02625.html#ae6172b08ed30615d88290ea4b4b6a70c">rgItems</a>[pMenu-&gt;<a class="code" href="a02625.html#a3bf37b161e5822f38a2b0bc722c5ac50">cItems</a> - 1]) - pItem,</div>
<div class="line"><a name="l00570"></a><span class="lineno">  570</span>&#160;                    -(<span class="keywordtype">int</span>)<span class="keyword">sizeof</span>(<a class="code" href="a02621.html">ITEM</a>));</div>
<div class="line"><a name="l00571"></a><span class="lineno">  571</span>&#160;        }</div>
<div class="line"><a name="l00572"></a><span class="lineno">  572</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00573"></a><span class="lineno">  573</span>&#160; </div>
<div class="line"><a name="l00574"></a><span class="lineno">  574</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00575"></a><span class="lineno">  575</span>&#160;<span class="comment">         * We&#39;re shrinking so if localalloc fails, just leave the mem as is.</span></div>
<div class="line"><a name="l00576"></a><span class="lineno">  576</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00577"></a><span class="lineno">  577</span>&#160;        <span class="keywordflow">if</span> (pMenu-&gt;<a class="code" href="a02625.html#a3bf37b161e5822f38a2b0bc722c5ac50">cItems</a> &lt;= (pMenu-&gt;<a class="code" href="a02625.html#a13b183d6135cf3858d71ba08802a8f71">cAlloced</a> - <a class="code" href="a00764.html#aa2c6c7fa7e6bbe61abc18d745e6773a4">CMENUITEMDEALLOC</a> + 1)) {</div>
<div class="line"><a name="l00578"></a><span class="lineno">  578</span>&#160;            pNewItems = (<a class="code" href="a00365.html#ab0258112d5896d2fea97153725ae601f">PITEM</a>)DesktopAlloc(pMenu-&gt;<a class="code" href="a02625.html#a89169c528df8ad521ef1f85c782b1dc8">head</a>.rpdesk-&gt;hheapDesktop,</div>
<div class="line"><a name="l00579"></a><span class="lineno">  579</span>&#160;                    (pMenu-&gt;<a class="code" href="a02625.html#a13b183d6135cf3858d71ba08802a8f71">cAlloced</a> - <a class="code" href="a00764.html#aa2c6c7fa7e6bbe61abc18d745e6773a4">CMENUITEMDEALLOC</a>) * <span class="keyword">sizeof</span>(<a class="code" href="a00365.html#a4e7bfddf7bbe2ec3b63691ccb9383fb5">ITEM</a>));</div>
<div class="line"><a name="l00580"></a><span class="lineno">  580</span>&#160;            <span class="keywordflow">if</span> (pNewItems != NULL) {</div>
<div class="line"><a name="l00581"></a><span class="lineno">  581</span>&#160; </div>
<div class="line"><a name="l00582"></a><span class="lineno">  582</span>&#160;                RtlCopyMemory(pNewItems, pMenu-&gt;<a class="code" href="a02625.html#ae6172b08ed30615d88290ea4b4b6a70c">rgItems</a>,</div>
<div class="line"><a name="l00583"></a><span class="lineno">  583</span>&#160;                        (pMenu-&gt;<a class="code" href="a02625.html#a13b183d6135cf3858d71ba08802a8f71">cAlloced</a> - <a class="code" href="a00764.html#aa2c6c7fa7e6bbe61abc18d745e6773a4">CMENUITEMDEALLOC</a>) * <span class="keyword">sizeof</span>(<a class="code" href="a02621.html">ITEM</a>));</div>
<div class="line"><a name="l00584"></a><span class="lineno">  584</span>&#160;<span class="preprocessor">#ifdef DEBUG</span></div>
<div class="line"><a name="l00585"></a><span class="lineno">  585</span>&#160;                <span class="keywordflow">if</span> (<a class="code" href="a00695.html#a23820d208059540aed0ec5434de2de56">gfTrackLocks</a>) {</div>
<div class="line"><a name="l00586"></a><span class="lineno">  586</span>&#160;                    RelocateMenuLockRecords(pNewItems, pMenu-&gt;<a class="code" href="a02625.html#a3bf37b161e5822f38a2b0bc722c5ac50">cItems</a> - 1,</div>
<div class="line"><a name="l00587"></a><span class="lineno">  587</span>&#160;                        ((PBYTE)pNewItems) - (PBYTE)(pMenu-&gt;<a class="code" href="a02625.html#ae6172b08ed30615d88290ea4b4b6a70c">rgItems</a>));</div>
<div class="line"><a name="l00588"></a><span class="lineno">  588</span>&#160;                }</div>
<div class="line"><a name="l00589"></a><span class="lineno">  589</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00590"></a><span class="lineno">  590</span>&#160;                DesktopFree(pMenu-&gt;<a class="code" href="a02625.html#a89169c528df8ad521ef1f85c782b1dc8">head</a>.rpdesk-&gt;hheapDesktop, pMenu-&gt;<a class="code" href="a02625.html#ae6172b08ed30615d88290ea4b4b6a70c">rgItems</a>);</div>
<div class="line"><a name="l00591"></a><span class="lineno">  591</span>&#160;                pMenu-&gt;<a class="code" href="a02625.html#a13b183d6135cf3858d71ba08802a8f71">cAlloced</a> -= <a class="code" href="a00764.html#aa2c6c7fa7e6bbe61abc18d745e6773a4">CMENUITEMDEALLOC</a>;</div>
<div class="line"><a name="l00592"></a><span class="lineno">  592</span>&#160;            } <span class="keywordflow">else</span></div>
<div class="line"><a name="l00593"></a><span class="lineno">  593</span>&#160;                pNewItems = pMenu-&gt;<a class="code" href="a02625.html#ae6172b08ed30615d88290ea4b4b6a70c">rgItems</a>;</div>
<div class="line"><a name="l00594"></a><span class="lineno">  594</span>&#160;        } <span class="keywordflow">else</span></div>
<div class="line"><a name="l00595"></a><span class="lineno">  595</span>&#160;            pNewItems = pMenu-&gt;<a class="code" href="a02625.html#ae6172b08ed30615d88290ea4b4b6a70c">rgItems</a>;</div>
<div class="line"><a name="l00596"></a><span class="lineno">  596</span>&#160;    }</div>
<div class="line"><a name="l00597"></a><span class="lineno">  597</span>&#160; </div>
<div class="line"><a name="l00598"></a><span class="lineno">  598</span>&#160;    pMenu-&gt;<a class="code" href="a02625.html#ae6172b08ed30615d88290ea4b4b6a70c">rgItems</a> = pNewItems;</div>
<div class="line"><a name="l00599"></a><span class="lineno">  599</span>&#160;    pMenu-&gt;<a class="code" href="a02625.html#a3bf37b161e5822f38a2b0bc722c5ac50">cItems</a>--;</div>
<div class="line"><a name="l00600"></a><span class="lineno">  600</span>&#160; </div>
<div class="line"><a name="l00601"></a><span class="lineno">  601</span>&#160;<span class="preprocessor">#ifdef MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00602"></a><span class="lineno">  602</span>&#160;    <span class="keywordflow">if</span> (ppopup) {</div>
<div class="line"><a name="l00603"></a><span class="lineno">  603</span>&#160;        <span class="comment">// this menu is currently being displayed -- redisplay the menu with</span></div>
<div class="line"><a name="l00604"></a><span class="lineno">  604</span>&#160;        <span class="comment">// this item removed</span></div>
<div class="line"><a name="l00605"></a><span class="lineno">  605</span>&#160;        xxxMNUpdateShownMenu(ppopup, pMenu-&gt;<a class="code" href="a02625.html#ae6172b08ed30615d88290ea4b4b6a70c">rgItems</a> + uiPos, TRUE);</div>
<div class="line"><a name="l00606"></a><span class="lineno">  606</span>&#160;        }</div>
<div class="line"><a name="l00607"></a><span class="lineno">  607</span>&#160;<span class="preprocessor">#endif // MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00608"></a><span class="lineno">  608</span>&#160;        <span class="keywordflow">return</span> TRUE;</div>
<div class="line"><a name="l00609"></a><span class="lineno">  609</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00899.html#a70b09c3e2b495630f4205d34be505afb">CheckLock()</a>, <a class="el" href="a00764_source.html#l00025">CMENUITEMDEALLOC</a>, <a class="el" href="a00695_source.html#l00021">gfTrackLocks</a>, <a class="el" href="a00764_source.html#l00454">MNFreeItem()</a>, <a class="el" href="a03752_source.html#l00334">MNLookUpItem()</a>, <a class="el" href="a00899_source.html#l01973">tagPOPUPMENU::posSelectedItem</a> , 以及 <a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT()</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a00764_source.html#l00654">_DeleteMenu()</a> , 以及 <a class="el" href="a00764_source.html#l00624">_RemoveMenu()</a>.</p>

</div>
</div>
<a id="ab0badc85e28199cedd2e7fac69eaa798"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab0badc85e28199cedd2e7fac69eaa798">&#9670;&nbsp;</a></span>SetLPITEMInfo()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">BOOL NEAR SetLPITEMInfo </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00365.html#af18dd4dd192e00a176acc4dc89084f34">PMENU</a>&#160;</td>
          <td class="paramname"><em>pMenu</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00365.html#ab0258112d5896d2fea97153725ae601f">PITEM</a>&#160;</td>
          <td class="paramname"><em>pItem</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">LPMENUITEMINFOW&#160;</td>
          <td class="paramname"><em>lpmii</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">PUNICODE_STRING&#160;</td>
          <td class="paramname"><em>pstr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00764_source.html">mnchange.c</a> 第 <a class="el" href="a00764_source.html#l00822">822</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00827"></a><span class="lineno">  827</span>&#160;{</div>
<div class="line"><a name="l00828"></a><span class="lineno">  828</span>&#160; </div>
<div class="line"><a name="l00829"></a><span class="lineno">  829</span>&#160;    <span class="keywordflow">if</span> (lpmii-&gt;fMask &amp; MIIM_TYPE) {</div>
<div class="line"><a name="l00830"></a><span class="lineno">  830</span>&#160;        HANDLE hstr;</div>
<div class="line"><a name="l00831"></a><span class="lineno">  831</span>&#160;        <a class="code" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>     cch;</div>
<div class="line"><a name="l00832"></a><span class="lineno">  832</span>&#160;        <a class="code" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>    fType = lpmii-&gt;fType;</div>
<div class="line"><a name="l00833"></a><span class="lineno">  833</span>&#160; </div>
<div class="line"><a name="l00834"></a><span class="lineno">  834</span>&#160;        <span class="keywordflow">if</span> (!(fType &amp; MFT_NONSTRING)) {</div>
<div class="line"><a name="l00835"></a><span class="lineno">  835</span>&#160;            <span class="keywordflow">if</span> (lpmii-&gt;dwTypeData == 0)</div>
<div class="line"><a name="l00836"></a><span class="lineno">  836</span>&#160;                fType = MFT_SEPARATOR;</div>
<div class="line"><a name="l00837"></a><span class="lineno">  837</span>&#160;            <span class="keywordflow">else</span> <span class="keywordflow">if</span> (pstrItem-&gt;Length != 0) {</div>
<div class="line"><a name="l00838"></a><span class="lineno">  838</span>&#160;                hstr = (HANDLE)DesktopAlloc(pMenu-&gt;<a class="code" href="a02625.html#a89169c528df8ad521ef1f85c782b1dc8">head</a>.rpdesk-&gt;hheapDesktop,</div>
<div class="line"><a name="l00839"></a><span class="lineno">  839</span>&#160;                    pstrItem-&gt;MaximumLength);</div>
<div class="line"><a name="l00840"></a><span class="lineno">  840</span>&#160; </div>
<div class="line"><a name="l00841"></a><span class="lineno">  841</span>&#160;                <span class="keywordflow">if</span> (hstr == NULL)</div>
<div class="line"><a name="l00842"></a><span class="lineno">  842</span>&#160;                    <span class="keywordflow">return</span> FALSE;</div>
<div class="line"><a name="l00843"></a><span class="lineno">  843</span>&#160;                <span class="keywordflow">try</span> {</div>
<div class="line"><a name="l00844"></a><span class="lineno">  844</span>&#160;                    RtlCopyMemory(hstr, pstrItem-&gt;Buffer, pstrItem-&gt;MaximumLength);</div>
<div class="line"><a name="l00845"></a><span class="lineno">  845</span>&#160;                } except (EXCEPTION_EXECUTE_HANDLER) {</div>
<div class="line"><a name="l00846"></a><span class="lineno">  846</span>&#160;                    DesktopFree(pMenu-&gt;<a class="code" href="a02625.html#a89169c528df8ad521ef1f85c782b1dc8">head</a>.rpdesk-&gt;hheapDesktop, hstr);</div>
<div class="line"><a name="l00847"></a><span class="lineno">  847</span>&#160;                    <span class="keywordflow">return</span> FALSE;</div>
<div class="line"><a name="l00848"></a><span class="lineno">  848</span>&#160;                }</div>
<div class="line"><a name="l00849"></a><span class="lineno">  849</span>&#160;                cch = pstrItem-&gt;Length / <span class="keyword">sizeof</span>(WCHAR);</div>
<div class="line"><a name="l00850"></a><span class="lineno">  850</span>&#160;            } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00851"></a><span class="lineno">  851</span>&#160;                cch = 0;</div>
<div class="line"><a name="l00852"></a><span class="lineno">  852</span>&#160;                hstr = NULL;</div>
<div class="line"><a name="l00853"></a><span class="lineno">  853</span>&#160;            }</div>
<div class="line"><a name="l00854"></a><span class="lineno">  854</span>&#160;        }</div>
<div class="line"><a name="l00855"></a><span class="lineno">  855</span>&#160; </div>
<div class="line"><a name="l00856"></a><span class="lineno">  856</span>&#160;        <a class="code" href="a00764.html#a5bdb5d81a1e054208d5b5740210d9ccf">FreeTypeData</a>(pMenu, pItem);</div>
<div class="line"><a name="l00857"></a><span class="lineno">  857</span>&#160;        pItem-&gt;<a class="code" href="a02621.html#a3f9ea4a7b91779e27ebb2a33a1484545">fType</a> &amp;= ~MFT_MASK;</div>
<div class="line"><a name="l00858"></a><span class="lineno">  858</span>&#160;        pItem-&gt;<a class="code" href="a02621.html#a3f9ea4a7b91779e27ebb2a33a1484545">fType</a> |= fType;</div>
<div class="line"><a name="l00859"></a><span class="lineno">  859</span>&#160; </div>
<div class="line"><a name="l00860"></a><span class="lineno">  860</span>&#160;        <span class="keywordflow">if</span> (fType &amp; MFT_NONSTRING) {</div>
<div class="line"><a name="l00861"></a><span class="lineno">  861</span>&#160;            <span class="keywordflow">if</span> (fType &amp; MFT_BITMAP)</div>
<div class="line"><a name="l00862"></a><span class="lineno">  862</span>&#160;                pItem-&gt;<a class="code" href="a02621.html#aeeb0fd843d821837779407bbd8ece0cf">hTypeData</a> = lpmii-&gt;dwTypeData;</div>
<div class="line"><a name="l00863"></a><span class="lineno">  863</span>&#160;            <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00864"></a><span class="lineno">  864</span>&#160;                <span class="keywordflow">if</span> (fType &amp; MFT_SEPARATOR)</div>
<div class="line"><a name="l00865"></a><span class="lineno">  865</span>&#160;                    pItem-&gt;<a class="code" href="a02621.html#a067bd58dd35ee07dea81d0b4a4e144ca">fState</a> |= MFS_DISABLED;</div>
<div class="line"><a name="l00866"></a><span class="lineno">  866</span>&#160; </div>
<div class="line"><a name="l00867"></a><span class="lineno">  867</span>&#160;                <span class="comment">// if MFT_OWNERDRAW, LEAVE lpItem-&gt;dwTypeData ALONE !!</span></div>
<div class="line"><a name="l00868"></a><span class="lineno">  868</span>&#160;                <span class="keywordflow">if</span> ( !(fType &amp; MFT_OWNERDRAW ) )</div>
<div class="line"><a name="l00869"></a><span class="lineno">  869</span>&#160;                    pItem-&gt;<a class="code" href="a02621.html#aeeb0fd843d821837779407bbd8ece0cf">hTypeData</a> = NULL;</div>
<div class="line"><a name="l00870"></a><span class="lineno">  870</span>&#160;            }</div>
<div class="line"><a name="l00871"></a><span class="lineno">  871</span>&#160; </div>
<div class="line"><a name="l00872"></a><span class="lineno">  872</span>&#160;            pItem-&gt;<a class="code" href="a02621.html#a1d342ea14e69d5eb171aa039c9bc4642">cch</a> = 0;</div>
<div class="line"><a name="l00873"></a><span class="lineno">  873</span>&#160;        } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00874"></a><span class="lineno">  874</span>&#160;            pItem-&gt;<a class="code" href="a02621.html#a1d342ea14e69d5eb171aa039c9bc4642">cch</a> = cch;</div>
<div class="line"><a name="l00875"></a><span class="lineno">  875</span>&#160;            pItem-&gt;<a class="code" href="a02621.html#aeeb0fd843d821837779407bbd8ece0cf">hTypeData</a> = hstr;</div>
<div class="line"><a name="l00876"></a><span class="lineno">  876</span>&#160;        }</div>
<div class="line"><a name="l00877"></a><span class="lineno">  877</span>&#160; </div>
<div class="line"><a name="l00878"></a><span class="lineno">  878</span>&#160;        pItem-&gt;<a class="code" href="a02621.html#a151f0f471d5e75bd8cf8f48af8b3bc74">dxTab</a>   = 0;</div>
<div class="line"><a name="l00879"></a><span class="lineno">  879</span>&#160;        pItem-&gt;<a class="code" href="a02621.html#a8d591c8d876b1475d86828e7d4b5c3e2">ulX</a>     = UNDERLINE_RECALC;</div>
<div class="line"><a name="l00880"></a><span class="lineno">  880</span>&#160;        pItem-&gt;<a class="code" href="a02621.html#a73de6baf1d51ce6ae04f662aeed06879">ulWidth</a> = 0;</div>
<div class="line"><a name="l00881"></a><span class="lineno">  881</span>&#160; </div>
<div class="line"><a name="l00882"></a><span class="lineno">  882</span>&#160;        <span class="comment">// Set the size of this menu to be 0 so that it gets recomputed with this</span></div>
<div class="line"><a name="l00883"></a><span class="lineno">  883</span>&#160;        <span class="comment">// new item...</span></div>
<div class="line"><a name="l00884"></a><span class="lineno">  884</span>&#160;        pMenu-&gt;<a class="code" href="a02625.html#a73d4a10b8c15f8ec2182bcb38dc6f350">cyMenu</a> = pMenu-&gt;<a class="code" href="a02625.html#af559c520a727e31f567b284c34f18a5e">cxMenu</a> = 0;</div>
<div class="line"><a name="l00885"></a><span class="lineno">  885</span>&#160; </div>
<div class="line"><a name="l00886"></a><span class="lineno">  886</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00887"></a><span class="lineno">  887</span>&#160;<span class="comment">         * Chicago removed the counterpart to this line (hMenu-&gt;hwndNotify = 0)</span></div>
<div class="line"><a name="l00888"></a><span class="lineno">  888</span>&#160;<span class="comment">         * We probably still need for deref</span></div>
<div class="line"><a name="l00889"></a><span class="lineno">  889</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00890"></a><span class="lineno">  890</span>&#160;        Unlock(&amp;pMenu-&gt;<a class="code" href="a02625.html#a472df270c88db7755093cd3ca1d1dee6">spwndNotify</a>);</div>
<div class="line"><a name="l00891"></a><span class="lineno">  891</span>&#160;    }</div>
<div class="line"><a name="l00892"></a><span class="lineno">  892</span>&#160; </div>
<div class="line"><a name="l00893"></a><span class="lineno">  893</span>&#160;    <span class="keywordflow">if</span> (lpmii-&gt;fMask &amp; MIIM_ID)</div>
<div class="line"><a name="l00894"></a><span class="lineno">  894</span>&#160;        pItem-&gt;<a class="code" href="a02621.html#a549e2c4984de0719485737b35d6fc4b1">wID</a> = lpmii-&gt;wID;</div>
<div class="line"><a name="l00895"></a><span class="lineno">  895</span>&#160; </div>
<div class="line"><a name="l00896"></a><span class="lineno">  896</span>&#160;    <span class="keywordflow">if</span> (lpmii-&gt;fMask &amp; MIIM_DATA)</div>
<div class="line"><a name="l00897"></a><span class="lineno">  897</span>&#160;        pItem-&gt;<a class="code" href="a02621.html#a433b5d21475241b192fa772448414ac3">dwItemData</a> = lpmii-&gt;dwItemData;</div>
<div class="line"><a name="l00898"></a><span class="lineno">  898</span>&#160; </div>
<div class="line"><a name="l00899"></a><span class="lineno">  899</span>&#160;    <span class="keywordflow">if</span> (lpmii-&gt;fMask &amp; MIIM_STATE) {</div>
<div class="line"><a name="l00900"></a><span class="lineno">  900</span>&#160;        pItem-&gt;<a class="code" href="a02621.html#a067bd58dd35ee07dea81d0b4a4e144ca">fState</a> = lpmii-&gt;fState | (pItem-&gt;<a class="code" href="a02621.html#a067bd58dd35ee07dea81d0b4a4e144ca">fState</a> &amp; (MFS_HILITE | MFS_DEFAULT));</div>
<div class="line"><a name="l00901"></a><span class="lineno">  901</span>&#160;        <span class="keywordflow">if</span> (pItem-&gt;<a class="code" href="a02621.html#a3f9ea4a7b91779e27ebb2a33a1484545">fType</a> &amp; MFT_SEPARATOR)</div>
<div class="line"><a name="l00902"></a><span class="lineno">  902</span>&#160;            pItem-&gt;<a class="code" href="a02621.html#a067bd58dd35ee07dea81d0b4a4e144ca">fState</a> |= MFS_DISABLED;</div>
<div class="line"><a name="l00903"></a><span class="lineno">  903</span>&#160;    }</div>
<div class="line"><a name="l00904"></a><span class="lineno">  904</span>&#160; </div>
<div class="line"><a name="l00905"></a><span class="lineno">  905</span>&#160;    <span class="keywordflow">if</span> (lpmii-&gt;fMask &amp; MIIM_CHECKMARKS) {</div>
<div class="line"><a name="l00906"></a><span class="lineno">  906</span>&#160;        pItem-&gt;<a class="code" href="a02621.html#a7287a955b880ce5bbb7e021b24abaf5e">hbmpChecked</a>     = lpmii-&gt;hbmpChecked;</div>
<div class="line"><a name="l00907"></a><span class="lineno">  907</span>&#160;        pItem-&gt;<a class="code" href="a02621.html#a1923ac059473a15e16c90dab53178d43">hbmpUnchecked</a>   = lpmii-&gt;hbmpUnchecked;</div>
<div class="line"><a name="l00908"></a><span class="lineno">  908</span>&#160;    }</div>
<div class="line"><a name="l00909"></a><span class="lineno">  909</span>&#160; </div>
<div class="line"><a name="l00910"></a><span class="lineno">  910</span>&#160;    <span class="keywordflow">if</span> (lpmii-&gt;fMask &amp; MIIM_SUBMENU) {</div>
<div class="line"><a name="l00911"></a><span class="lineno">  911</span>&#160;        <a class="code" href="a02625.html">PMENU</a> pSubMenu = NULL;</div>
<div class="line"><a name="l00912"></a><span class="lineno">  912</span>&#160; </div>
<div class="line"><a name="l00913"></a><span class="lineno">  913</span>&#160;        <span class="keywordflow">if</span> (lpmii-&gt;hSubMenu != NULL)</div>
<div class="line"><a name="l00914"></a><span class="lineno">  914</span>&#160;            pSubMenu = <a class="code" href="a00899.html#a47dda1f338284caf5c8478d1a008e89d">ValidateHmenu</a>(lpmii-&gt;hSubMenu);</div>
<div class="line"><a name="l00915"></a><span class="lineno">  915</span>&#160; </div>
<div class="line"><a name="l00916"></a><span class="lineno">  916</span>&#160;        <span class="comment">// Free the popup associated with this item, if any and if needed.</span></div>
<div class="line"><a name="l00917"></a><span class="lineno">  917</span>&#160;        <span class="keywordflow">if</span> (pItem-&gt;<a class="code" href="a02621.html#ac10ce08286532c51caca752ec8eb7e99">spSubMenu</a> != pSubMenu) {</div>
<div class="line"><a name="l00918"></a><span class="lineno">  918</span>&#160;            <span class="keywordflow">if</span> (pItem-&gt;<a class="code" href="a02621.html#ac10ce08286532c51caca752ec8eb7e99">spSubMenu</a> != NULL) {</div>
<div class="line"><a name="l00919"></a><span class="lineno">  919</span>&#160;                <a class="code" href="a00764.html#a906695c6f4890acd6aad57e32e3a763e">FreePopup</a>(pItem);</div>
<div class="line"><a name="l00920"></a><span class="lineno">  920</span>&#160;            }</div>
<div class="line"><a name="l00921"></a><span class="lineno">  921</span>&#160;            <span class="keywordflow">if</span> (pSubMenu!=NULL) {</div>
<div class="line"><a name="l00922"></a><span class="lineno">  922</span>&#160;                Lock(&amp;(pItem-&gt;<a class="code" href="a02621.html#ac10ce08286532c51caca752ec8eb7e99">spSubMenu</a>), pSubMenu);</div>
<div class="line"><a name="l00923"></a><span class="lineno">  923</span>&#160;                SetMF(pItem-&gt;<a class="code" href="a02621.html#ac10ce08286532c51caca752ec8eb7e99">spSubMenu</a>, MFISPOPUP);</div>
<div class="line"><a name="l00924"></a><span class="lineno">  924</span>&#160;            } <span class="keywordflow">else</span></div>
<div class="line"><a name="l00925"></a><span class="lineno">  925</span>&#160;                Unlock(&amp;(pItem-&gt;<a class="code" href="a02621.html#ac10ce08286532c51caca752ec8eb7e99">spSubMenu</a>));</div>
<div class="line"><a name="l00926"></a><span class="lineno">  926</span>&#160;        }</div>
<div class="line"><a name="l00927"></a><span class="lineno">  927</span>&#160;    }</div>
<div class="line"><a name="l00928"></a><span class="lineno">  928</span>&#160; </div>
<div class="line"><a name="l00929"></a><span class="lineno">  929</span>&#160;    <span class="keywordflow">return</span>(TRUE);</div>
<div class="line"><a name="l00930"></a><span class="lineno">  930</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00365_source.html#l01972">tagITEM::cch</a>, <a class="el" href="a00365_source.html#l02002">tagMENU::cxMenu</a>, <a class="el" href="a00365_source.html#l02003">tagMENU::cyMenu</a>, <a class="el" href="a00365_source.html#l01973">tagITEM::dwItemData</a>, <a class="el" href="a00365_source.html#l01979">tagITEM::dxTab</a>, <a class="el" href="a00764_source.html#l00438">FreePopup()</a>, <a class="el" href="a00764_source.html#l00390">FreeTypeData()</a>, <a class="el" href="a00365_source.html#l01960">tagITEM::fState</a>, <a class="el" href="a00365_source.html#l01959">tagITEM::fType</a>, <a class="el" href="a00365_source.html#l01963">tagITEM::hbmpChecked</a>, <a class="el" href="a00365_source.html#l01964">tagITEM::hbmpUnchecked</a>, <a class="el" href="a00365_source.html#l01993">tagMENU::head</a>, <a class="el" href="a00365_source.html#l01968">tagITEM::hTypeData</a>, <a class="el" href="a00365_source.html#l01962">tagITEM::spSubMenu</a>, <a class="el" href="a00365_source.html#l02004">tagMENU::spwndNotify</a>, <a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT()</a>, <a class="el" href="a00365_source.html#l01981">tagITEM::ulWidth</a>, <a class="el" href="a00365_source.html#l01980">tagITEM::ulX</a>, <a class="el" href="a00902_source.html#l00141">ValidateHmenu()</a> , 以及 <a class="el" href="a00365_source.html#l01961">tagITEM::wID</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a00764_source.html#l00161">_InsertMenuItem()</a> , 以及 <a class="el" href="a00764_source.html#l00062">_SetMenuItemInfo()</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div class="ttc" id="aa02621_html_a151f0f471d5e75bd8cf8f48af8b3bc74"><div class="ttname"><a href="a02621.html#a151f0f471d5e75bd8cf8f48af8b3bc74">tagITEM::dxTab</a></div><div class="ttdeci">DWORD dxTab</div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l01979">user.h:1979</a></div></div>
<div class="ttc" id="aa00764_html_a564740dd1ded698906e3d819f9e89d6d"><div class="ttname"><a href="a00764.html#a564740dd1ded698906e3d819f9e89d6d">CMENUITEMALLOC</a></div><div class="ttdeci">#define CMENUITEMALLOC</div><div class="ttdef"><b>Definition:</b> <a href="a00764_source.html#l00024">mnchange.c:24</a></div></div>
<div class="ttc" id="aa02621_html"><div class="ttname"><a href="a02621.html">tagITEM</a></div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l01958">user.h:1958</a></div></div>
<div class="ttc" id="aa02625_html_af559c520a727e31f567b284c34f18a5e"><div class="ttname"><a href="a02625.html#af559c520a727e31f567b284c34f18a5e">tagMENU::cxMenu</a></div><div class="ttdeci">DWORD cxMenu</div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l02002">user.h:2002</a></div></div>
<div class="ttc" id="aa02621_html_add79d19081e05aa07fece764c9cc07b5"><div class="ttname"><a href="a02621.html#add79d19081e05aa07fece764c9cc07b5">tagITEM::yItem</a></div><div class="ttdeci">DWORD yItem</div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l01975">user.h:1975</a></div></div>
<div class="ttc" id="aa02621_html_a067bd58dd35ee07dea81d0b4a4e144ca"><div class="ttname"><a href="a02621.html#a067bd58dd35ee07dea81d0b4a4e144ca">tagITEM::fState</a></div><div class="ttdeci">UINT fState</div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l01960">user.h:1960</a></div></div>
<div class="ttc" id="aa02625_html_a13b183d6135cf3858d71ba08802a8f71"><div class="ttname"><a href="a02625.html#a13b183d6135cf3858d71ba08802a8f71">tagMENU::cAlloced</a></div><div class="ttdeci">UINT cAlloced</div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l01999">user.h:1999</a></div></div>
<div class="ttc" id="aa02625_html_a89169c528df8ad521ef1f85c782b1dc8"><div class="ttname"><a href="a02625.html#a89169c528df8ad521ef1f85c782b1dc8">tagMENU::head</a></div><div class="ttdeci">PROCOBJHEAD head</div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l01993">user.h:1993</a></div></div>
<div class="ttc" id="aa02621_html_a1d342ea14e69d5eb171aa039c9bc4642"><div class="ttname"><a href="a02621.html#a1d342ea14e69d5eb171aa039c9bc4642">tagITEM::cch</a></div><div class="ttdeci">DWORD cch</div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l01972">user.h:1972</a></div></div>
<div class="ttc" id="aa02621_html_a7287a955b880ce5bbb7e021b24abaf5e"><div class="ttname"><a href="a02621.html#a7287a955b880ce5bbb7e021b24abaf5e">tagITEM::hbmpChecked</a></div><div class="ttdeci">HANDLE hbmpChecked</div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l01963">user.h:1963</a></div></div>
<div class="ttc" id="aa02621_html_a8d591c8d876b1475d86828e7d4b5c3e2"><div class="ttname"><a href="a02621.html#a8d591c8d876b1475d86828e7d4b5c3e2">tagITEM::ulX</a></div><div class="ttdeci">DWORD ulX</div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l01980">user.h:1980</a></div></div>
<div class="ttc" id="aa00764_html_a1dffa91dd8880b8d4d35725f9b1bf590"><div class="ttname"><a href="a00764.html#a1dffa91dd8880b8d4d35725f9b1bf590">MNFreeItem</a></div><div class="ttdeci">void MNFreeItem(PMENU pMenu, PITEM pItem, BOOL fFreeItemPopup)</div><div class="ttdef"><b>Definition:</b> <a href="a00764_source.html#l00454">mnchange.c:454</a></div></div>
<div class="ttc" id="aa02621_html_aee23f6e29ba54dcb506225dfc9504118"><div class="ttname"><a href="a02621.html#aee23f6e29ba54dcb506225dfc9504118">tagITEM::cxBmp</a></div><div class="ttdeci">int cxBmp</div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l01984">user.h:1984</a></div></div>
<div class="ttc" id="aa02621_html_a433b5d21475241b192fa772448414ac3"><div class="ttname"><a href="a02621.html#a433b5d21475241b192fa772448414ac3">tagITEM::dwItemData</a></div><div class="ttdeci">DWORD dwItemData</div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l01973">user.h:1973</a></div></div>
<div class="ttc" id="aa02625_html_a73d4a10b8c15f8ec2182bcb38dc6f350"><div class="ttname"><a href="a02625.html#a73d4a10b8c15f8ec2182bcb38dc6f350">tagMENU::cyMenu</a></div><div class="ttdeci">DWORD cyMenu</div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l02003">user.h:2003</a></div></div>
<div class="ttc" id="aa02837_html"><div class="ttname"><a href="a02837.html">tagPOPUPMENU</a></div><div class="ttdef"><b>Definition:</b> <a href="a00899_source.html#l01880">userk.h:1880</a></div></div>
<div class="ttc" id="aa02621_html_a8ddffda03875be635307092e985f7066"><div class="ttname"><a href="a02621.html#a8ddffda03875be635307092e985f7066">tagITEM::lpstr</a></div><div class="ttdeci">LPWSTR lpstr</div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l01966">user.h:1966</a></div></div>
<div class="ttc" id="aa00776_html_a39c71da1ccf5728e77c34be3cffb99d8"><div class="ttname"><a href="a00776.html#a39c71da1ccf5728e77c34be3cffb99d8">_DestroyMenu</a></div><div class="ttdeci">BOOL _DestroyMenu(PMENU pMenu)</div><div class="ttdef"><b>Definition:</b> <a href="a00776_source.html#l00027">mndstry.c:27</a></div></div>
<div class="ttc" id="aa02621_html_a73de6baf1d51ce6ae04f662aeed06879"><div class="ttname"><a href="a02621.html#a73de6baf1d51ce6ae04f662aeed06879">tagITEM::ulWidth</a></div><div class="ttdeci">DWORD ulWidth</div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l01981">user.h:1981</a></div></div>
<div class="ttc" id="aa00764_html_aa2c6c7fa7e6bbe61abc18d745e6773a4"><div class="ttname"><a href="a00764.html#aa2c6c7fa7e6bbe61abc18d745e6773a4">CMENUITEMDEALLOC</a></div><div class="ttdeci">#define CMENUITEMDEALLOC</div><div class="ttdef"><b>Definition:</b> <a href="a00764_source.html#l00025">mnchange.c:25</a></div></div>
<div class="ttc" id="aa00764_html_a906695c6f4890acd6aad57e32e3a763e"><div class="ttname"><a href="a00764.html#a906695c6f4890acd6aad57e32e3a763e">FreePopup</a></div><div class="ttdeci">void NEAR FreePopup(PITEM pItem)</div><div class="ttdef"><b>Definition:</b> <a href="a00764_source.html#l00438">mnchange.c:438</a></div></div>
<div class="ttc" id="aa02621_html_aeeb0fd843d821837779407bbd8ece0cf"><div class="ttname"><a href="a02621.html#aeeb0fd843d821837779407bbd8ece0cf">tagITEM::hTypeData</a></div><div class="ttdeci">HANDLE hTypeData</div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l01968">user.h:1968</a></div></div>
<div class="ttc" id="aa00371_html_ae61d954062a9ece52e350e54cad9a23d"><div class="ttname"><a href="a00371.html#ae61d954062a9ece52e350e54cad9a23d">RIPERR0</a></div><div class="ttdeci">#define RIPERR0(idErr, flags, szFmt)</div><div class="ttdef"><b>Definition:</b> <a href="a00371_source.html#l00119">winerrp.h:119</a></div></div>
<div class="ttc" id="aa00899_html_abfae1dfb48db23dcea4494f7990ad6a6"><div class="ttname"><a href="a00899.html#abfae1dfb48db23dcea4494f7990ad6a6">ThreadLock</a></div><div class="ttdeci">VOID ThreadLock(PVOID pobj, PTL ptl)</div></div>
<div class="ttc" id="aa00365_html_a4e7bfddf7bbe2ec3b63691ccb9383fb5"><div class="ttname"><a href="a00365.html#a4e7bfddf7bbe2ec3b63691ccb9383fb5">ITEM</a></div><div class="ttdeci">struct tagITEM ITEM</div></div>
<div class="ttc" id="aa02625_html_a3bf37b161e5822f38a2b0bc722c5ac50"><div class="ttname"><a href="a02625.html#a3bf37b161e5822f38a2b0bc722c5ac50">tagMENU::cItems</a></div><div class="ttdeci">UINT cItems</div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l02000">user.h:2000</a></div></div>
<div class="ttc" id="aa00764_html_ab0badc85e28199cedd2e7fac69eaa798"><div class="ttname"><a href="a00764.html#ab0badc85e28199cedd2e7fac69eaa798">SetLPITEMInfo</a></div><div class="ttdeci">BOOL SetLPITEMInfo(PMENU pMenu, PITEM pItem, LPMENUITEMINFOW lpmii, PUNICODE_STRING pstr)</div><div class="ttdef"><b>Definition:</b> <a href="a00764_source.html#l00822">mnchange.c:822</a></div></div>
<div class="ttc" id="aa00365_html_ab0258112d5896d2fea97153725ae601f"><div class="ttname"><a href="a00365.html#ab0258112d5896d2fea97153725ae601f">PITEM</a></div><div class="ttdeci">struct tagITEM * PITEM</div></div>
<div class="ttc" id="aa00764_html_a5bdb5d81a1e054208d5b5740210d9ccf"><div class="ttname"><a href="a00764.html#a5bdb5d81a1e054208d5b5740210d9ccf">FreeTypeData</a></div><div class="ttdeci">void FreeTypeData(PMENU pMenu, PITEM pItem)</div><div class="ttdef"><b>Definition:</b> <a href="a00764_source.html#l00390">mnchange.c:390</a></div></div>
<div class="ttc" id="aa02625_html"><div class="ttname"><a href="a02625.html">tagMENU</a></div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l01992">user.h:1992</a></div></div>
<div class="ttc" id="aa00563_html_a074685e97e89d6aa2accdfcb82328699"><div class="ttname"><a href="a00563.html#a074685e97e89d6aa2accdfcb82328699">DWORD</a></div><div class="ttdeci">ddeml v[i&lt; inst &gt;][t&lt; type &gt;][hObj|pObj] Dump DDEML state information ddeml lists all ddeml instances for this process n ddeml t&lt; type &gt; lists all ddeml objects of the given type n n assumes link is first DWORD</div><div class="ttdef"><b>Definition:</b> <a href="a00563_source.html#l00175">exts.h:175</a></div></div>
<div class="ttc" id="aa02621_html_ac10ce08286532c51caca752ec8eb7e99"><div class="ttname"><a href="a02621.html#ac10ce08286532c51caca752ec8eb7e99">tagITEM::spSubMenu</a></div><div class="ttdeci">struct tagMENU * spSubMenu</div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l01962">user.h:1962</a></div></div>
<div class="ttc" id="aa01881_html"><div class="ttname"><a href="a01881.html">_TL</a></div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00347">usercli.h:347</a></div></div>
<div class="ttc" id="aa00899_html_a47dda1f338284caf5c8478d1a008e89d"><div class="ttname"><a href="a00899.html#a47dda1f338284caf5c8478d1a008e89d">ValidateHmenu</a></div><div class="ttdeci">PMENU ValidateHmenu(HMENU hmenu)</div><div class="ttdef"><b>Definition:</b> <a href="a00902_source.html#l00141">validate.c:141</a></div></div>
<div class="ttc" id="aa02621_html_a7e2f0bd56b29ee245667384d07a03544"><div class="ttname"><a href="a02621.html#a7e2f0bd56b29ee245667384d07a03544">tagITEM::hbmp</a></div><div class="ttdeci">HBITMAP hbmp</div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l01983">user.h:1983</a></div></div>
<div class="ttc" id="aa00371_html_a41f433389f20db57f042022a662e96de"><div class="ttname"><a href="a00371.html#a41f433389f20db57f042022a662e96de">RIP_WARNING</a></div><div class="ttdeci">#define RIP_WARNING</div><div class="ttdef"><b>Definition:</b> <a href="a00371_source.html#l00029">winerrp.h:29</a></div></div>
<div class="ttc" id="aa02621_html_a549e2c4984de0719485737b35d6fc4b1"><div class="ttname"><a href="a02621.html#a549e2c4984de0719485737b35d6fc4b1">tagITEM::wID</a></div><div class="ttdeci">UINT wID</div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l01961">user.h:1961</a></div></div>
<div class="ttc" id="aa02837_html_a783d647af1c22968f32f520c9a1a1625"><div class="ttname"><a href="a02837.html#a783d647af1c22968f32f520c9a1a1625">tagPOPUPMENU::posSelectedItem</a></div><div class="ttdeci">UINT posSelectedItem</div><div class="ttdef"><b>Definition:</b> <a href="a00899_source.html#l01973">userk.h:1973</a></div></div>
<div class="ttc" id="aa02621_html_aea89500b6f536eb62e40f363ee039f05"><div class="ttname"><a href="a02621.html#aea89500b6f536eb62e40f363ee039f05">tagITEM::cyItem</a></div><div class="ttdeci">DWORD cyItem</div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l01978">user.h:1978</a></div></div>
<div class="ttc" id="aa02621_html_ae6a647bf0c77d45824a9f70b01b33bae"><div class="ttname"><a href="a02621.html#ae6a647bf0c77d45824a9f70b01b33bae">tagITEM::cyBmp</a></div><div class="ttdeci">int cyBmp</div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l01985">user.h:1985</a></div></div>
<div class="ttc" id="aa02621_html_a3f9ea4a7b91779e27ebb2a33a1484545"><div class="ttname"><a href="a02621.html#a3f9ea4a7b91779e27ebb2a33a1484545">tagITEM::fType</a></div><div class="ttdeci">UINT fType</div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l01959">user.h:1959</a></div></div>
<div class="ttc" id="aa02625_html_a978db2c3ca45448bef67cdfdcf839355"><div class="ttname"><a href="a02625.html#a978db2c3ca45448bef67cdfdcf839355">tagMENU::dwContextHelpId</a></div><div class="ttdeci">DWORD dwContextHelpId</div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l02006">user.h:2006</a></div></div>
<div class="ttc" id="aa02621_html_a1bd951bbc5c909b8bd138b83ddfe31bd"><div class="ttname"><a href="a02621.html#a1bd951bbc5c909b8bd138b83ddfe31bd">tagITEM::xItem</a></div><div class="ttdeci">DWORD xItem</div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l01974">user.h:1974</a></div></div>
<div class="ttc" id="aa00365_html_a600b2eecb3e014ccef3cbdb2b38209b5"><div class="ttname"><a href="a00365.html#a600b2eecb3e014ccef3cbdb2b38209b5">MNLookUpItem</a></div><div class="ttdeci">PITEM MNLookUpItem(PMENU pMenu, UINT wCmd, BOOL fByPosition, PMENU *ppMenuItemIsOn)</div><div class="ttdef"><b>Definition:</b> <a href="a03752_source.html#l00334">rtl/wow.c:334</a></div></div>
<div class="ttc" id="aa03608_html_afd1a0e78d1f88954d93e48ab3821781f"><div class="ttname"><a href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a></div><div class="ttdeci">typedef UINT(FAR WINAPI *MSGSOUNDPROC)()</div></div>
<div class="ttc" id="aa02625_html_a472df270c88db7755093cd3ca1d1dee6"><div class="ttname"><a href="a02625.html#a472df270c88db7755093cd3ca1d1dee6">tagMENU::spwndNotify</a></div><div class="ttdeci">struct tagWND * spwndNotify</div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l02004">user.h:2004</a></div></div>
<div class="ttc" id="aa02621_html_ae0bdadacf987896fbfaf632d6e9f057c"><div class="ttname"><a href="a02621.html#ae0bdadacf987896fbfaf632d6e9f057c">tagITEM::cxItem</a></div><div class="ttdeci">DWORD cxItem</div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l01976">user.h:1976</a></div></div>
<div class="ttc" id="aa00695_html_a23820d208059540aed0ec5434de2de56"><div class="ttname"><a href="a00695.html#a23820d208059540aed0ec5434de2de56">gfTrackLocks</a></div><div class="ttdeci">BOOL gfTrackLocks</div><div class="ttdef"><b>Definition:</b> <a href="a00695_source.html#l00021">handtabl.c:21</a></div></div>
<div class="ttc" id="aa00899_html_a70b09c3e2b495630f4205d34be505afb"><div class="ttname"><a href="a00899.html#a70b09c3e2b495630f4205d34be505afb">CheckLock</a></div><div class="ttdeci">VOID CheckLock(PVOID pobj)</div></div>
<div class="ttc" id="aa02621_html_a1923ac059473a15e16c90dab53178d43"><div class="ttname"><a href="a02621.html#a1923ac059473a15e16c90dab53178d43">tagITEM::hbmpUnchecked</a></div><div class="ttdeci">HANDLE hbmpUnchecked</div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l01964">user.h:1964</a></div></div>
<div class="ttc" id="aa02625_html_ae6172b08ed30615d88290ea4b4b6a70c"><div class="ttname"><a href="a02625.html#ae6172b08ed30615d88290ea4b4b6a70c">tagMENU::rgItems</a></div><div class="ttdeci">PITEM rgItems</div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l02005">user.h:2005</a></div></div>
<div class="ttc" id="aa00203_html_a23e426afda41ba996c345e468634c3f3"><div class="ttname"><a href="a00203.html#a23e426afda41ba996c345e468634c3f3">GetSysMenuHandle</a></div><div class="ttdeci">PMENU GetSysMenuHandle(PWND pwnd)</div><div class="ttdef"><b>Definition:</b> <a href="a00203_source.html#l00436">menuc.c:436</a></div></div>
<div class="ttc" id="aa00764_html_a5441ac5610fd5ab2f26a669ed08f2764"><div class="ttname"><a href="a00764.html#a5441ac5610fd5ab2f26a669ed08f2764">RemoveDeleteMenuHelper</a></div><div class="ttdeci">BOOL RemoveDeleteMenuHelper(PMENU pMenu, UINT nPosition, DWORD wFlags, BOOL fDeleteMenu)</div><div class="ttdef"><b>Definition:</b> <a href="a00764_source.html#l00488">mnchange.c:488</a></div></div>
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_885cc87fac2d91e269af0a5a959fa5f6.html">E:</a></li><li class="navelem"><a class="el" href="dir_4e091ed8704426a7a4980368ba259fde.html">git</a></li><li class="navelem"><a class="el" href="dir_cd70cb5eb491250157f2d55d3ff4b13e.html">backup</a></li><li class="navelem"><a class="el" href="dir_ba2b673b566ba104b956abdc6dec0552.html">org</a></li><li class="navelem"><a class="el" href="dir_5bb0003d7907b45051943541418399f5.html">ntuser</a></li><li class="navelem"><a class="el" href="dir_2a0a56546b70a0973705719e6a88eab3.html">kernel</a></li><li class="navelem"><a class="el" href="a00764.html">mnchange.c</a></li>
    <li class="footer">制作者
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
  </ul>
</div>
</body>
</html>
